class RSpec::Expectations::LegacyMatcherAdapter::RSpec1

Before RSpec 1.2, the failure message protocol was:

* `failure_message`
* `negative_failure_message`

@private

Public Class Methods

interface_matches?(matcher) click to toggle source

Note: `failure_message` is part of the RSpec 3 protocol (paired with `failure_message_when_negated`), so we don't check for `failure_message` here.

# File lib/rspec/expectations/handler.rb, line 169
def self.interface_matches?(matcher)
  !matcher.respond_to?(:failure_message_when_negated) &&
  matcher.respond_to?(:negative_failure_message)
end

Public Instance Methods

failure_message() click to toggle source
# File lib/rspec/expectations/handler.rb, line 158
def failure_message
  base_matcher.failure_message
end
failure_message_when_negated() click to toggle source
# File lib/rspec/expectations/handler.rb, line 162
def failure_message_when_negated
  base_matcher.negative_failure_message
end