Apparently there is no assert_false
in Test::Unit. How would you add it by extending assertions and adding the file config/initializers/assertions_helper.rb
?
Is this the best way to do it? I don't want to modify test/unit/assertions.rb
.
By the way, I don't think it is redundant. I was using assert_equal false, something_to_evaluate
. The problem with this approach is that it is easy to accidentally use assert false, something_to_evaluate
. This will always fail, doesn't throw an error or warning, and invites bugs into the tests.