Class: Ramcrest::EqualTo::Matcher
- Inherits:
-
Object
- Object
- Ramcrest::EqualTo::Matcher
show all
- Includes:
- Matcher
- Defined in:
- lib/ramcrest/equal_to.rb
Instance Method Summary
collapse
Methods included from Matcher
#matches?, #mismatch, #success
Constructor Details
#initialize(expected) ⇒ Matcher
Returns a new instance of Matcher.
19
20
21
|
# File 'lib/ramcrest/equal_to.rb', line 19
def initialize(expected)
@expected = expected
end
|
Instance Method Details
#description ⇒ Object
31
32
33
|
# File 'lib/ramcrest/equal_to.rb', line 31
def description
"#{@expected}"
end
|
#do_match(expected, actual) ⇒ Object
23
24
25
|
# File 'lib/ramcrest/equal_to.rb', line 23
def do_match(expected, actual)
MatchResult.new(expected == actual)
end
|
#mismatch_message(actual, match) ⇒ Object
27
28
29
|
# File 'lib/ramcrest/equal_to.rb', line 27
def mismatch_message(actual, match)
"#{actual}"
end
|