All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Housekeeping: added release badge to README
- Improved
docs:fixtask to handle more YARD-transformed filenames (likeREADME_md.html,USAGE_md.html, etc.) and ensure they are correctly mapped to their finalfile.*.htmlcounterparts.
- Reorganized documentation: extracted detailed usage into
USAGE.mdand added Table of Contents. - Internal refactoring: moved
DescendsFromtovalue_matchers.rband consolidated type matchers.
- Added missing tests for
NilValue,Truthy,Falsy, andInstanceOfmatchers.
- Housekeeping: automate CI and release workflows
1.0.0 - 2026-01-17
-
Core matchers
equals(expected)- value equality with deep comparisonis(expected)- reference equality (now supports matchers as well, e.g.,is(anything))anything- placeholder matcher that accepts any valuenever(matcher)- negation
-
Type and method matchers
is_a(type)(alias ofdescends_from) - type/class checking (including hierarchy)descends_from(type)- type/class checking (including hierarchy)instance_of(type)- exact class checkingresponds_to(*methods)- method presence checking
-
Value matchers
nil_value- matchesniltruthy- matches any value that is notnilorfalsefalsy- matchesnilorfalse
-
String matchers
starts_with(prefix)- string prefix matchingends_with(suffix)- string suffix matchingmatches_pattern(regex)- regex pattern matchingblank- blank string matching (empty or whitespace-only)
-
Size and emptiness matchers
empty- empty collection matchinghas_size(expected)- size/length matching (accepts matchers)
-
Numeric comparison matchers
is_greater_than(n)is_greater_than_or_equal_to(n)is_less_than(n)is_less_than_or_equal_to(n)between(min, max, exclusive: false)- range checkis_close_to(n, delta)- floating-point tolerance
-
Collection content matchers
includes(*items)- partial containment (strings, arrays, hashes)has_key(*keys)- hash key presencehas_value(*values)- hash value presencecontains(*items)- exact items in any ordercontains_exactly(*items)- exact items in exact order
-
Collection item matchers
all_items(matcher)- all items must matchsome_items(matcher)- at least one item must matchno_items(matcher)- no items should matchall_entries(matcher)- all hash entries must matchsome_entry(matcher)- at least one hash entry must matchno_entry(matcher)- no hash entries should match
-
Membership matcher
is_in(collection)- value membership in arrays, hashes, strings, ranges
-
Object attribute matcher
has_attribute(name, matcher = nil)- object/hash attribute checking
-
Error assertions
raises_error(class = nil, message_matcher = nil)- block raises errorraises_nothing- block does not raise
-
Combinators
&operator - AND combination|operator - OR combinationall_of(*matchers)- all matchers must matchsome_of(*matchers)- at least one matcher must matchnone_of(*matchers)- no matcher should match
-
Fluent API
assert_that(actual).equals(expected)assert_that(actual).is(expected)assert_that(actual).never(matcher)(aliases:is_not,does_not)assert_that(actual).matches(matcher)assert_that { block }.raises_errorassert_that { block }.raises_nothing
-
Custom matcher API
Minicrest.register_matcher(name, &block)- register custom matchers- Subclass
Minicrest::Matcherto create custom matchers
-
Detailed failure messages
- Hash diffs showing missing/extra/changed keys
- Array diffs showing index-based differences
- String diffs showing position of first difference