Sha256: d73d5b5f5c1e0712f59df70ef275d77f25fb24f368a27395fe0eeab718e7d266
Contents?: true
Size: 506 Bytes
Versions: 198
Compression:
Stored size: 506 Bytes
Contents
class EqualMatcher def initialize(expected) @expected = expected end def matches?(actual) @actual = actual @actual.equal?(@expected) end def failure_message ["Expected #{@actual.pretty_inspect}", "to be identical to #{@expected.pretty_inspect}"] end def negative_failure_message ["Expected #{@actual.pretty_inspect}", "not to be identical to #{@expected.pretty_inspect}"] end end class Object def equal(expected) EqualMatcher.new(expected) end end
Version data entries
198 entries across 174 versions & 4 rubygems