Class: Matchy::Expectations::EqlExpectation
- Inherits:
-
Base
- Object
- Base
- Matchy::Expectations::EqlExpectation
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
81
82
83
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 81
def failure_message
"Expected #{@receiver.inspect} to eql #{@expected.inspect}."
end
|
#matches?(receiver) ⇒ Boolean
76
77
78
79
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 76
def matches?(receiver)
@receiver = receiver
@expected.eql?(receiver)
end
|
#negative_failure_message ⇒ Object
85
86
87
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 85
def negative_failure_message
"Expected #{@receiver.inspect} to not eql #{@expected.inspect}."
end
|