ruby-test-frameworks
Installation
SKILL.md
Minitest vs Test-Unit Divergences
Only covers where minitest and test-unit diverge. If something isn't listed here, it works the same in both.
Assertion Naming Mismatches
Using the wrong name causes NoMethodError.
| Concept | minitest | test-unit |
|---|---|---|
| Exception | assert_raises (plural) |
assert_raise (singular) |
| Throw | assert_throws (plural) |
assert_throw (singular) |
| Collection inclusion | assert_includes (plural) |
assert_include (singular) |
| Path exists | assert_path_exists (with s) |
assert_path_exist (no s) |
| Negation pattern | refute_* (e.g. refute_nil) |
assert_not_* (e.g. assert_not_nil) |
test-unit aliases minitest names (assert_raises, refute_*, etc.), so minitest syntax works in test-unit but not vice versa.
Assertions That Only Exist in One Framework
Related skills
More from st0012/ruby-skills
ruby-resource-map
Use when working in a Ruby project - provides authoritative sources for documentation, typing, and tooling
10ruby-version-manager
Use at session start for Ruby projects (Gemfile, .ruby-version, or .tool-versions present). Detect version manager BEFORE running ruby, bundle, gem, rake, rails, rspec, or any Ruby command.
9