Compare Minitest::Unit and Minitest::Spec assertion styles
masterSince Minitest::Spec is built on top of Minitest::Unit, you can mix and match assertion styles. You can use traditional assert_* methods or the Spec-style expect().must_* syntax interchangeably.
| Style | Example |
|---|---|
| Minitest::Unit | assert_equal 100, foo |
| Minitest::Spec | expect(foo).must_equal 100 |
# Minitest::Unit Assertion Style:
assert_equal 100, foo
# Minitest::Spec Assertion Style:
expect(foo).must_equal 100