Module: RSpec::Matchers::DSL::DefaultImplementations
- Includes:
- BuiltIn::BaseMatcher::DefaultFailureMessages
- Included in:
- Matcher
- Defined in:
- lib/rspec/matchers/dsl.rb
Overview
Defines default implementations of the matcher
protocol methods for custom matchers. You can
override any of these using the Macros methods
from within an RSpec::Matchers.define
block.
Instance Method Summary (collapse)
-
- (Object) description
The default description.
-
- (Boolean) diffable?
private
Used internally by objects returns by
should
andshould_not
. -
- (Boolean) expects_call_stack_jump?
Most matchers do not expect call stack jumps.
-
- (Boolean) supports_block_expectations?
Matchers do not support block expectations by default.
Methods included from BuiltIn::BaseMatcher::DefaultFailureMessages
#failure_message, #failure_message_when_negated
Instance Method Details
- (Object) description
The default description.
302 303 304 |
# File 'lib/rspec/matchers/dsl.rb', line 302 def description "#{name_to_sentence}#{to_sentence expected}#{chained_method_clause_sentences}" end |
- (Boolean) diffable?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Used internally by objects returns by should
and should_not
.
297 298 299 |
# File 'lib/rspec/matchers/dsl.rb', line 297 def diffable? false end |
- (Boolean) expects_call_stack_jump?
Most matchers do not expect call stack jumps.
313 314 315 |
# File 'lib/rspec/matchers/dsl.rb', line 313 def expects_call_stack_jump? false end |
- (Boolean) supports_block_expectations?
Matchers do not support block expectations by default. You must opt-in.
308 309 310 |
# File 'lib/rspec/matchers/dsl.rb', line 308 def supports_block_expectations? false end |