Method: MiniTest::Assertions#assert_operator
- Defined in:
- lib/minitest/unit.rb
#assert_operator(o1, op, o2, msg = nil) ⇒ Object
For testing equality operators and so-forth.
assert_operator 5, :<=, 4
194 195 196 197 |
# File 'lib/minitest/unit.rb', line 194 def assert_operator o1, op, o2, msg = nil msg = (msg) { "Expected #{mu_pp(o1)} to be #{op} #{mu_pp(o2)}" } assert o1.__send__(op, o2), msg end |