Method: Test::Unit::Assertions#assert_not_predicate
- Defined in:
- lib/test/unit/assertions.rb
#assert_not_predicate(object, predicate, message = nil) ⇒ Object Also known as: refute_predicate
Passes if ‘object`.`predicate` is false or nil.
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 |
# File 'lib/test/unit/assertions.rb', line 1553 def assert_not_predicate(object, predicate, =nil) _wrap_assertion do assert_respond_to(object, predicate, ) actual = object.__send__(predicate) = (, "<?>.? is false value expected but was\n" + "<?>", object, AssertionMessage.literal(predicate), actual) assert_block() do not actual end end end |