Sha256: 9daba5b4b98166a3aa976b6973c08137f918cf4f4f8499eaf5bfffc3c0578a4d
Contents?: true
Size: 310 Bytes
Versions: 17
Compression:
Stored size: 310 Bytes
Contents
RSpecCandy::Switcher.define_matcher :be_same_number_as do |expected| match do |actual| actual.is_a?(Numeric) && expected.is_a?(Numeric) && normalize(expected) == normalize(actual) end def normalize(number) number.to_s.tap do |str| str << ".0" unless str.include?('.') end end end
Version data entries
17 entries across 17 versions & 1 rubygems