Class: Matchy::Expectations::BeKindOfExpectation
- Inherits:
-
Base
- Object
- Base
- Matchy::Expectations::BeKindOfExpectation
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
25
26
27
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 25
def failure_message
"Expected #{@receiver.inspect} to be kind of #{@expected.inspect}."
end
|
#matches?(receiver) ⇒ Boolean
20
21
22
23
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 20
def matches?(receiver)
@receiver = receiver
@receiver.kind_of?(@expected)
end
|
#negative_failure_message ⇒ Object
29
30
31
|
# File 'lib/matchy/built_in/truth_expectations.rb', line 29
def negative_failure_message
"Expected #{@receiver.inspect} to not be kind of #{@expected.inspect}."
end
|