Module: Etest::ComparisonAssertions
- Included in:
- MiniTest::Unit::TestCase
- Defined in:
- lib/etest/comparison_assertions.rb
Instance Method Summary collapse
-
#assert_eq(p1, p2) ⇒ Object
for reasons of API completeness and orthogonality only.
- #assert_ge(p1, p2) ⇒ Object
- #assert_gt(p1, p2) ⇒ Object
- #assert_le(p1, p2) ⇒ Object
- #assert_lt(p1, p2) ⇒ Object
- #assert_ne(p1, p2) ⇒ Object
Instance Method Details
#assert_eq(p1, p2) ⇒ Object
for reasons of API completeness and orthogonality only.
20 21 22 |
# File 'lib/etest/comparison_assertions.rb', line 20 def assert_eq(p1, p2) assert_equal(p1, p2) end |
#assert_ge(p1, p2) ⇒ Object
10 11 12 |
# File 'lib/etest/comparison_assertions.rb', line 10 def assert_ge(p1, p2) assert(p1 >= p2, "#{p1.inspect} should be greater than or equal #{p2.inspect} but is not") end |
#assert_gt(p1, p2) ⇒ Object
14 15 16 |
# File 'lib/etest/comparison_assertions.rb', line 14 def assert_gt(p1, p2) assert(p1 > p2, "#{p1.inspect} should be greater than #{p2.inspect} but is not") end |
#assert_le(p1, p2) ⇒ Object
6 7 8 |
# File 'lib/etest/comparison_assertions.rb', line 6 def assert_le(p1, p2) assert(p1 <= p2, "#{p1.inspect} should be less than or equal #{p2.inspect} but is not") end |
#assert_lt(p1, p2) ⇒ Object
2 3 4 |
# File 'lib/etest/comparison_assertions.rb', line 2 def assert_lt(p1, p2) assert(p1 < p2, "#{p1.inspect} should be less than #{p2.inspect} but is not") end |
#assert_ne(p1, p2) ⇒ Object
24 25 26 |
# File 'lib/etest/comparison_assertions.rb', line 24 def assert_ne(p1, p2) assert_not_equal(p1, p2) end |