Class: RSpec::Matchers::BuiltIn::Be
- Inherits:
-
BaseMatcher
- Object
- BaseMatcher
- RSpec::Matchers::BuiltIn::Be
- Defined in:
- lib/rspec/matchers/built_in/be.rb
Direct Known Subclasses
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
-
- (Be) initialize(*args, &block)
constructor
A new instance of Be.
- - (Object) match(_, actual)
Methods inherited from BaseMatcher
#==, #description, #diffable?, #match_unless_raises, #matches?
Methods included from Pretty
#_pretty_print, #name, #name_to_sentence, #split_words, #to_sentence, #to_word, #underscore
Constructor Details
- (Be) initialize(*args, &block)
A new instance of Be
49 50 51 |
# File 'lib/rspec/matchers/built_in/be.rb', line 49 def initialize(*args, &block) @args = args end |
Instance Method Details
- (Object) failure_message_for_should
57 58 59 |
# File 'lib/rspec/matchers/built_in/be.rb', line 57 def "expected #{@actual.inspect} to evaluate to true" end |
- (Object) failure_message_for_should_not
61 62 63 |
# File 'lib/rspec/matchers/built_in/be.rb', line 61 def "expected #{@actual.inspect} to evaluate to false" end |
- (Object) match(_, actual)
53 54 55 |
# File 'lib/rspec/matchers/built_in/be.rb', line 53 def match(_, actual) !!actual end |