Class: Crspec::Matchers::BeAKindOfMatcher
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected
Instance Method Summary
collapse
Methods inherited from BaseMatcher
#and, #initialize, #or
Instance Method Details
#failure_message ⇒ Object
146
147
148
|
# File 'lib/crspec/matchers.rb', line 146
def failure_message
"Expected #{@actual.inspect} to be a kind of #{@expected}"
end
|
#failure_message_when_negated ⇒ Object
150
151
152
|
# File 'lib/crspec/matchers.rb', line 150
def failure_message_when_negated
"Expected #{@actual.inspect} not to be a kind of #{@expected}"
end
|
#matches?(actual) ⇒ Boolean
141
142
143
144
|
# File 'lib/crspec/matchers.rb', line 141
def matches?(actual)
@actual = actual
@actual.is_a?(@expected)
end
|