Class: Matchy::Expectations::SatisfyExpectation
- Inherits:
-
Base
- Object
- Base
- Matchy::Expectations::SatisfyExpectation
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
111
112
113
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 111
def failure_message
"Expected #{@receiver.inspect} to satisfy given block."
end
|
#matches?(receiver) ⇒ Boolean
106
107
108
109
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 106
def matches?(receiver)
@receiver = receiver
@expected.call(receiver) == true
end
|
#negative_failure_message ⇒ Object
115
116
117
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 115
def negative_failure_message
"Expected #{@receiver.inspect} to not satisfy given block."
end
|