Class: RSpec::Matchers::BuiltIn::BeNil
- Inherits:
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::BeNil
- Defined in:
- lib/rspec/matchers/built_in/be.rb
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected, #rescued_exception
Instance Method Summary collapse
- #failure_message_for_should ⇒ Object
- #failure_message_for_should_not ⇒ Object
- #match(_, actual) ⇒ Object
Methods inherited from BaseMatcher
#==, #description, #diffable?, #initialize, #match_unless_raises, #matches?
Methods included from Pretty
#_pretty_print, #expected_to_sentence, #name, #name_to_sentence, #split_words, #to_sentence, #underscore
Constructor Details
This class inherits a constructor from RSpec::Matchers::BuiltIn::BaseMatcher
Instance Method Details
#failure_message_for_should ⇒ Object
39 40 41 |
# File 'lib/rspec/matchers/built_in/be.rb', line 39 def "expected: nil\n got: #{actual.inspect}" end |
#failure_message_for_should_not ⇒ Object
43 44 45 |
# File 'lib/rspec/matchers/built_in/be.rb', line 43 def "expected: not nil\n got: nil" end |
#match(_, actual) ⇒ Object
35 36 37 |
# File 'lib/rspec/matchers/built_in/be.rb', line 35 def match(_, actual) actual.nil? end |