Sha256: 46281c7505d2462432c515d2a79ede56bfe85004ba347c593a7febcb6c5121e6
Contents?: true
Size: 563 Bytes
Versions: 6
Compression:
Stored size: 563 Bytes
Contents
module DecimalMatcher class BeDecimal def initialize(expected) @expected = BigDecimal.new(expected) end def matches?(target) @target = target @target.is_a?(BigDecimal) && @target == @expected end def failure_message_for_should "expected #{@target.inspect} to be a [BigDecimal: #{@expected.to_s("F")}]" end def failure_message_for_should_not "expected #{@target.inspect} not to be a [BigDecimal: #{@expected.to_s("F")}]" end end def be_decimal(expected) BeDecimal.new(expected) end end
Version data entries
6 entries across 1 versions & 1 rubygems