Class: RSpec::Matchers::BuiltIn::BeTruthy
- Inherits:
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::BeTruthy
- Defined in:
- lib/rspec/matchers/built_in/be.rb
Constant Summary
Constant Summary
Constants inherited from BaseMatcher
RSpec::Matchers::BuiltIn::BaseMatcher::UNDEFINED
Instance Attribute Summary
Attributes inherited from BaseMatcher
#actual, #expected, #rescued_exception
Instance Method Summary (collapse)
- - (Object) failure_message_for_should
- - (Object) failure_message_for_should_not
- - (Object) match(_, actual)
Methods inherited from BaseMatcher
#description, #diffable?, #initialize, #match_unless_raises, #matches?, #supports_block_expectations?
Methods included from MatchAliases
Methods included from Pretty
#_pretty_print, #expected_to_sentence, #name, #name_to_sentence, #split_words, #to_sentence, #to_word, #underscore
Constructor Details
This class inherits a constructor from RSpec::Matchers::BuiltIn::BaseMatcher
Instance Method Details
- (Object) failure_message_for_should
11 12 13 |
# File 'lib/rspec/matchers/built_in/be.rb', line 11 def "expected: truthy value\n got: #{actual.inspect}" end |
- (Object) failure_message_for_should_not
15 16 17 |
# File 'lib/rspec/matchers/built_in/be.rb', line 15 def "expected: falsey value\n got: #{actual.inspect}" end |
- (Object) match(_, actual)
7 8 9 |
# File 'lib/rspec/matchers/built_in/be.rb', line 7 def match(_, actual) !!actual end |