Class: Crspec::Matchers::BeNilMatcher
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected
Instance Method Summary
collapse
Methods inherited from BaseMatcher
#initialize
Instance Method Details
#failure_message ⇒ Object
59
60
61
|
# File 'lib/crspec/matchers.rb', line 59
def failure_message
"Expected #{@actual.inspect} to be nil"
end
|
#failure_message_when_negated ⇒ Object
63
64
65
|
# File 'lib/crspec/matchers.rb', line 63
def failure_message_when_negated
"Expected #{@actual.inspect} not to be nil"
end
|
#matches?(actual) ⇒ Boolean
54
55
56
57
|
# File 'lib/crspec/matchers.rb', line 54
def matches?(actual)
@actual = actual
@actual.nil?
end
|