Class: Crspec::Matchers::BeNilMatcher
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
109
110
111
|
# File 'lib/crspec/matchers.rb', line 109
def failure_message
"Expected #{@actual.inspect} to be nil"
end
|
#failure_message_when_negated ⇒ Object
113
114
115
|
# File 'lib/crspec/matchers.rb', line 113
def failure_message_when_negated
"Expected #{@actual.inspect} not to be nil"
end
|
#matches?(actual) ⇒ Boolean
104
105
106
107
|
# File 'lib/crspec/matchers.rb', line 104
def matches?(actual)
@actual = actual
@actual.nil?
end
|