@api private
Used internally as a base class for matchers that ship with rspec-expectations.
### Warning:
This class is for internal use, and subject to change without notice. We strongly recommend that you do not base your custom matchers on this class. If/when this changes, we will announce it and remove this warning.
# File lib/rspec/matchers/built_in/base_matcher.rb, line 53 53: def ==(other) 54: matches?(other) 55: end
# File lib/rspec/matchers/built_in/base_matcher.rb, line 45 45: def description 46: expected ? "#{name_to_sentence} #{expected.inspect}" : name_to_sentence 47: end
# File lib/rspec/matchers/built_in/base_matcher.rb, line 49 49: def diffable? 50: false 51: end
# File lib/rspec/matchers/built_in/base_matcher.rb, line 37 37: def failure_message_for_should 38: "expected #{actual.inspect} to #{name_to_sentence}#{expected_to_sentence}" 39: end
# File lib/rspec/matchers/built_in/base_matcher.rb, line 41 41: def failure_message_for_should_not 42: "expected #{actual.inspect} not to #{name_to_sentence}#{expected_to_sentence}" 43: end
# File lib/rspec/matchers/built_in/base_matcher.rb, line 27 27: def match_unless_raises(*exceptions) 28: exceptions.unshift Exception if exceptions.empty? 29: begin 30: yield 31: rescue *exceptions => @rescued_exception 32: return false 33: end 34: true 35: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.