Module: RSpec::Matchers::DSL::DefaultImplementations
- 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
- 
  
      #description  ⇒ Object 
  
    The default description. 
- 
  
      #diffable?  ⇒ Boolean 
  
  private
    Used internally by objects returns by shouldandshould_not.
- 
  
      #expects_call_stack_jump?  ⇒ Boolean 
  
    Most matchers do not expect call stack jumps. 
- 
  
      #supports_block_expectations?  ⇒ Boolean 
  
    Matchers do not support block expectations by default. 
Methods included from BuiltIn::BaseMatcher::DefaultFailureMessages
#failure_message, #failure_message_when_negated
Instance Method Details
#description ⇒ Object
The default description.
| 394 395 396 397 398 | # File 'lib/rspec/matchers/dsl.rb', line 394 def description english_name = EnglishPhrasing.split_words(name) expected_list = EnglishPhrasing.list(expected) "#{english_name}#{expected_list}#{chained_method_clause_sentences}" end | 
#diffable? ⇒ Boolean
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.
| 389 390 391 | # File 'lib/rspec/matchers/dsl.rb', line 389 def diffable? false end | 
#expects_call_stack_jump? ⇒ Boolean
Most matchers do not expect call stack jumps.
| 407 408 409 | # File 'lib/rspec/matchers/dsl.rb', line 407 def expects_call_stack_jump? false end | 
#supports_block_expectations? ⇒ Boolean
Matchers do not support block expectations by default. You must opt-in.
| 402 403 404 | # File 'lib/rspec/matchers/dsl.rb', line 402 def supports_block_expectations? false end |