Fix botched copy/paste

This commit is contained in:
Michael Miller 2019-03-04 18:30:18 -07:00
parent e7441df159
commit 1090a7f2f3
2 changed files with 4 additions and 4 deletions

View file

@ -191,7 +191,7 @@ describe Spectator::Matchers::EndWithMatcher do
last = "baz" last = "baz"
partial = new_partial(value) partial = new_partial(value)
matcher = Spectator::Matchers::EndWithMatcher.new(last) matcher = Spectator::Matchers::EndWithMatcher.new(last)
matcher.message(partial).should contain("#starts_with?") matcher.message(partial).should contain("#ends_with?")
end end
end end
@ -247,7 +247,7 @@ describe Spectator::Matchers::EndWithMatcher do
last = "baz" last = "baz"
partial = new_partial(value) partial = new_partial(value)
matcher = Spectator::Matchers::EndWithMatcher.new(last) matcher = Spectator::Matchers::EndWithMatcher.new(last)
matcher.negated_message(partial).should contain("#starts_with?") matcher.negated_message(partial).should contain("#ends_with?")
end end
end end

View file

@ -40,7 +40,7 @@ module Spectator::Matchers
# Otherwise, treat the actual type as an `Indexable`, # Otherwise, treat the actual type as an `Indexable`,
# and retrieve the last value to compare with. # and retrieve the last value to compare with.
# FIXME: Is there a better way to do this? # FIXME: Is there a better way to do this?
if {{actual}}.responds_to?(:starts_with?) if {{actual}}.responds_to?(:ends_with?)
{{block.args.first}} = EndsWithCompareMethod.new {{block.args.first}} = EndsWithCompareMethod.new
{{block.body}} {{block.body}}
else else
@ -58,7 +58,7 @@ module Spectator::Matchers
# String representation for end-user output. # String representation for end-user output.
def to_s def to_s
"#starts_with?" "#ends_with?"
end end
end end