diff options
Diffstat (limited to 'spec/matchers/hash_the_same_as.rb')
-rw-r--r-- | spec/matchers/hash_the_same_as.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/matchers/hash_the_same_as.rb b/spec/matchers/hash_the_same_as.rb index c1903b62b4..03e955a0cb 100644 --- a/spec/matchers/hash_the_same_as.rb +++ b/spec/matchers/hash_the_same_as.rb @@ -3,24 +3,24 @@ module HashTheSameAsMatcher def initialize(expected) @expected = expected end - + def matches?(actual) @actual = actual hash = {} hash[@expected] = :some_arbitrary_value hash[@actual] == :some_arbitrary_value end - + def failure_message "expected #{@actual} to hash the same as #{@expected}; they must be `eql?` and have the same `#hash` value" end - + def negative_failure_message "expected #{@actual} to hash differently than #{@expected}; they must not be `eql?` or have a differing `#hash` values" end end - + def hash_the_same_as(expected) HashTheSameAs.new(expected) end -end
\ No newline at end of file +end |