Sha256: a314cbab19d58c5c80a2b778c4ece12e2d5d0e21bda4d77247b8a586b3a6f830

Contents?: true

Size: 769 Bytes

Versions: 4

Compression:

Stored size: 769 Bytes

Contents

module Etest::ComparisonAssertions
  def assert_lt(p1, p2)
    assert(p1 < p2, "#{p1.inspect} should be less than #{p2.inspect} but is not")
  end

  def assert_le(p1, p2)
    assert(p1 <= p2, "#{p1.inspect} should be less than or equal #{p2.inspect} but is not")
  end

  def assert_ge(p1, p2)
    assert(p1 >= p2, "#{p1.inspect} should be greater than or equal #{p2.inspect} but is not")
  end

  def assert_gt(p1, p2)
    assert(p1 > p2, "#{p1.inspect} should be greater than #{p2.inspect} but is not")
  end

  # for reasons of API completeness and orthogonality only.

  def assert_eq(p1, p2)
    assert_equal(p1, p2)
  end

  def assert_ne(p1, p2)
    assert_not_equal(p1, p2)
  end
end

class MiniTest::Unit::TestCase
  include ::Etest::ComparisonAssertions
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
etest-0.6.3 lib/etest/comparison_assertions.rb
etest-0.6.2 lib/etest/comparison_assertions.rb
etest-0.6.1 lib/etest/comparison_assertions.rb
etest-0.6.0 lib/etest/comparison_assertions.rb