aboutsummaryrefslogtreecommitdiffstats
path: root/spec/matchers/hash_the_same_as.rb
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-17 16:20:40 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-17 16:20:40 -0400
commitdc7b51883b1cc8ad7e525b7315fb575ae77a5b3d (patch)
tree97f5e4d55baa45f9805eb36a2196bcc12094ae3a /spec/matchers/hash_the_same_as.rb
parent19b2af181009acfcb24d156ca350c148630e6787 (diff)
downloadrails-dc7b51883b1cc8ad7e525b7315fb575ae77a5b3d.tar.gz
rails-dc7b51883b1cc8ad7e525b7315fb575ae77a5b3d.tar.bz2
rails-dc7b51883b1cc8ad7e525b7315fb575ae77a5b3d.zip
Whitespace
Diffstat (limited to 'spec/matchers/hash_the_same_as.rb')
-rw-r--r--spec/matchers/hash_the_same_as.rb10
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