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 355 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 handlers and compound matchers.
# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 350 def diffable? false end
Most matchers do not expect call stack jumps.
# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 372 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 363 def supports_block_expectations? false end
# File rspec-expectations/lib/rspec/matchers/dsl.rb, line 367 def supports_value_expectations? true end