module RSpec::Matchers::DSL::DefaultImplementations

Defines default implementations of the matcher protocol methods for custom matchers. You can override any of these using the {RSpec::Matchers::DSL::Macros Macros} methods from within an ‘RSpec::Matchers.define` block.

Public Instance Methods

The default description.

# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 395
def description
  english_name = EnglishPhrasing.split_words(name)
  expected_list = EnglishPhrasing.list(expected)
  "#{english_name}#{expected_list}#{chained_method_clause_sentences}"
end

@api private Used internally by objects returns by ‘should` and `should_not`.

# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 390
def diffable?
  false
end

Most matchers do not expect call stack jumps.

# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 412
def expects_call_stack_jump?
  false
end

Matchers do not support block expectations by default. You must opt-in.

# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 403
def supports_block_expectations?
  false
end
# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 407
def supports_value_expectations?
  true
end