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