Method: Minitest::Assertions#refute_predicate
- Defined in:
- lib/minitest/assertions.rb
#refute_predicate(o1, op, msg = nil) ⇒ Object
For testing with predicates.
refute_predicate str, :empty?
This is really meant for specs and is front-ended by refute_operator:
str.wont_be :empty?
618 619 620 621 |
# File 'lib/minitest/assertions.rb', line 618 def refute_predicate o1, op, msg = nil msg = (msg) { "Expected #{mu_pp(o1)} to not be #{op}" } refute o1.__send__(op), msg end |