Class: Minicrest::NilValue
- Defined in:
- lib/minicrest/value_matchers.rb
Overview
Matcher that checks if a value is nil.
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message(actual) ⇒ Object
- #matches?(actual) ⇒ Boolean
- #negated_failure_message(actual) ⇒ Object
Methods inherited from Matcher
Instance Method Details
#description ⇒ Object
12 13 14 |
# File 'lib/minicrest/value_matchers.rb', line 12 def description 'nil' end |
#failure_message(actual) ⇒ Object
16 17 18 |
# File 'lib/minicrest/value_matchers.rb', line 16 def (actual) "expected #{actual.inspect} to be nil" end |
#matches?(actual) ⇒ Boolean
8 9 10 |
# File 'lib/minicrest/value_matchers.rb', line 8 def matches?(actual) actual.nil? end |
#negated_failure_message(actual) ⇒ Object
20 21 22 |
# File 'lib/minicrest/value_matchers.rb', line 20 def (actual) "expected #{actual.inspect} not to be nil, but it was" end |