Class: Crspec::Matchers::EqMatcher
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected
Instance Method Summary
collapse
Methods inherited from BaseMatcher
#initialize
Instance Method Details
#failure_message ⇒ Object
27
28
29
|
# File 'lib/crspec/matchers.rb', line 27
def failure_message
"Expected #{@expected.inspect}, got #{@actual.inspect}"
end
|
#failure_message_when_negated ⇒ Object
31
32
33
|
# File 'lib/crspec/matchers.rb', line 31
def failure_message_when_negated
"Expected value not to equal #{@expected.inspect}"
end
|
#matches?(actual) ⇒ Boolean
22
23
24
25
|
# File 'lib/crspec/matchers.rb', line 22
def matches?(actual)
@actual = actual
@actual == @expected
end
|