I'm writing something about Minitest::Assertions
, which causes me to wonder:
- Is there an occasion when a simple
assert(test)
could not be replaced by a more informative assertion?
For example:
-
assert(5 <= 4)
reports onlyExpected false to be truthy.
Whereas:
-
assert_operator(5, :<=, 4)
reportsExpected 5 to be <= 4.
I have not been able to come up with an example where assert
is the best we can do.
Thoughts?