Class: Crspec::Matchers::EqMatcher
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected
Instance Method Summary
collapse
Methods inherited from BaseMatcher
#and, #initialize, #or
Instance Method Details
#failure_message ⇒ Object
77
78
79
|
# File 'lib/crspec/matchers.rb', line 77
def failure_message
"Expected #{@expected.inspect}, got #{@actual.inspect}"
end
|
#failure_message_when_negated ⇒ Object
81
82
83
|
# File 'lib/crspec/matchers.rb', line 81
def failure_message_when_negated
"Expected value not to equal #{@expected.inspect}"
end
|
#matches?(actual) ⇒ Boolean
72
73
74
75
|
# File 'lib/crspec/matchers.rb', line 72
def matches?(actual)
@actual = actual
@actual == @expected
end
|