Class: Matchy::Expectations::BeExpectation
- Inherits:
-
Base
- Object
- Base
- Matchy::Expectations::BeExpectation
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
10
11
12
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 10
def failure_message
"Expected #{@receiver.inspect} to be #{@expected.inspect}."
end
|
#matches?(receiver) ⇒ Boolean
4
5
6
7
8
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 4
def matches?(receiver)
@receiver = receiver
@expected == receiver
end
|
#negative_failure_message ⇒ Object
14
15
16
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 14
def negative_failure_message
"Expected #{@receiver.inspect} to not be #{@expected.inspect}."
end
|