Created
February 2, 2011 19:55
-
-
Save unicornrainbow/808298 to your computer and use it in GitHub Desktop.
Negating assertions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def assert_not(test, msg = (nomsg = true; nil)) | |
nomsg ? assert(!test) : assert(!test, msg) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a nice little diddy, but totally not needed thanks to minitest. Just use refute.