aboutsummaryrefslogtreecommitdiffstats
path: root/spec/matchers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/matchers')
-rw-r--r--spec/matchers/be_like.rb10
-rw-r--r--spec/matchers/hash_the_same_as.rb10
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/matchers/be_like.rb b/spec/matchers/be_like.rb
index cea3f3027b..c1b1ffc3fd 100644
--- a/spec/matchers/be_like.rb
+++ b/spec/matchers/be_like.rb
@@ -4,17 +4,17 @@ module BeLikeMatcher
@expected = expected
end
- def matches?(target)
- @target = target
- @expected.gsub(/\s+/, ' ').strip == @target.gsub(/\s+/, ' ').strip
+ def matches?(actual)
+ @actual = actual
+ @expected.gsub(/\s+/, ' ').strip == @actual.gsub(/\s+/, ' ').strip
end
def failure_message
- "expected #{@target} to be like #{@expected}"
+ "expected #{@actual} to be like #{@expected}"
end
def negative_failure_message
- "expected #{@target} to be unlike #{@expected}"
+ "expected #{@actual} to be unlike #{@expected}"
end
end
diff --git a/spec/matchers/hash_the_same_as.rb b/spec/matchers/hash_the_same_as.rb
index 86e98f31a3..c1903b62b4 100644
--- a/spec/matchers/hash_the_same_as.rb
+++ b/spec/matchers/hash_the_same_as.rb
@@ -4,19 +4,19 @@ module HashTheSameAsMatcher
@expected = expected
end
- def matches?(target)
- @target = target
+ def matches?(actual)
+ @actual = actual
hash = {}
hash[@expected] = :some_arbitrary_value
- hash[@target] == :some_arbitrary_value
+ hash[@actual] == :some_arbitrary_value
end
def failure_message
- "expected #{@target} to hash the same as #{@expected}; they must be `eql?` and have the same `#hash` value"
+ "expected #{@actual} to hash the same as #{@expected}; they must be `eql?` and have the same `#hash` value"
end
def negative_failure_message
- "expected #{@target} to hash differently than #{@expected}; they must not be `eql?` or have a differing `#hash` values"
+ "expected #{@actual} to hash differently than #{@expected}; they must not be `eql?` or have a differing `#hash` values"
end
end