Sha256: 960b6222498617ed6fa30f225b2b7ecb40b3b220c7b90189e4e9d3a2a127b86f

Contents?: true

Size: 590 Bytes

Versions: 14

Compression:

Stored size: 590 Bytes

Contents

require "rspec/expectations"

RSpec::Matchers.define :be_a_multiple_of do |expected|
  match do |actual|
    actual % expected == 0
  end
end

RSpec::Matchers.define :be_greater_than do |expected|
  match do |actual|
    actual > expected
  end
end

RSpec::Matchers.define :be_less_than do |expected|
  match do |actual|
    actual < expected
  end
end

RSpec::Matchers.define :be_less_than_or_equal_to do |expected|
  match do |actual|
    actual <= expected
  end
end

RSpec::Matchers.define :be_greater_than_or_equal_to do |expected|
  match do |actual|
    actual >= expected
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
json_test_data-1.2.0 spec/matchers/number_matchers.rb
json_test_data-1.1.3 spec/matchers/number_matchers.rb
json_test_data-1.1.2 spec/matchers/number_matchers.rb
json_test_data-1.1.1 spec/matchers/number_matchers.rb
json_test_data-1.1.0 spec/matchers/number_matchers.rb
json_test_data-1.0.0 spec/matchers/number_matchers.rb
json_test_data-0.9.0 spec/matchers/number_matchers.rb
json_test_data-0.8.0 spec/matchers/number_matchers.rb
json_test_data-0.7.0 spec/matchers/number_matchers.rb
json_test_data-0.6.0 spec/matchers/number_matchers.rb
json_test_data-0.5.1 spec/matchers/number_matchers.rb
json_test_data-0.5.0 spec/matchers/number_matchers.rb
json_test_data-0.4.0 spec/matchers/number_matchers.rb
json_test_data-0.4.0.beta spec/matchers/number_matchers.rb