Class: Matchy::Expectations::EqualExpectation
- Inherits:
-
Base
- Object
- Base
- Matchy::Expectations::EqualExpectation
show all
- Defined in:
- lib/matchy/built_in/truth_expectations.rb
Instance Method Summary
collapse
Methods inherited from Base
#fail!, #initialize, #pass!
Instance Method Details
#failure_message ⇒ Object
96
97
98
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 96
def failure_message
"Expected #{@receiver.inspect} to equal #{@expected.inspect}."
end
|
#matches?(receiver) ⇒ Boolean
91
92
93
94
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 91
def matches?(receiver)
@receiver = receiver
@expected.equal?(receiver)
end
|
#negative_failure_message ⇒ Object
100
101
102
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 100
def negative_failure_message
"Expected #{@receiver.inspect} to not equal #{@expected.inspect}."
end
|