Class: Smartest::BeNilMatcher
- Defined in:
- lib/smartest/matchers.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #matches?(actual) ⇒ Boolean
- #negated_failure_message ⇒ Object
Methods inherited from Matcher
Instance Method Details
#description ⇒ Object
375 376 377 |
# File 'lib/smartest/matchers.rb', line 375 def description "be nil" end |
#failure_message ⇒ Object
367 368 369 |
# File 'lib/smartest/matchers.rb', line 367 def "expected #{@actual.inspect} to be nil" end |
#matches?(actual) ⇒ Boolean
362 363 364 365 |
# File 'lib/smartest/matchers.rb', line 362 def matches?(actual) @actual = actual actual.nil? end |
#negated_failure_message ⇒ Object
371 372 373 |
# File 'lib/smartest/matchers.rb', line 371 def "expected #{@actual.inspect} not to be nil" end |