assert_not

assert_not(object, message = nil)
Instance Public methods

Assert that an expression is not truthy. Passes if object is nil or false. âTruthyâ means âconsidered true in a conditionalâ like if foo.

assert_not nil    # => true
assert_not false  # => true
assert_not 'foo'  # => 'foo' is not nil or false

An error message can be specified.

assert_not foo, 'foo should be false'
doc_ruby_on_rails
2015-06-20 00:00:00
Comments
Leave a Comment

Please login to continue.