Permalink
Browse files

EqualTo seemed different, but can be brought into same pattern

  • Loading branch information...
1 parent bab1298 commit b8bacadf15e4ca8e75b82bf2f7d152c4274938db @coreyhaines committed Jul 1, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/ramcrest/equal_to.rb
View
@@ -20,12 +20,12 @@ def initialize(expected)
@expected = expected
end
- def matches?(actual)
- if @expected == actual
- success
- else
- mismatch("#{actual}")
- end
+ def do_match(expected, actual)
+ MatchResult.new(expected == actual)
+ end
+
+ def mismatch_message(actual, match)
+ "#{actual}"
end
def description

0 comments on commit b8bacad

Please sign in to comment.