class RSpec::Expectations::PositiveExpectationHandler

def self.handle_matcher(actual, matcher, message=nil, &block)

def self.handle_matcher(actual, matcher, message=nil, &block)
  check_message(message)
  ::RSpec::Matchers.last_should = :should
  ::RSpec::Matchers.last_matcher = matcher
  return ::RSpec::Matchers::BuiltIn::PositiveOperatorMatcher.new(actual) if matcher.nil?
  match = matcher.matches?(actual, &block)
  return match if match
  message = message.call if message.respond_to?(:call)
  message ||= matcher.respond_to?(:failure_message_for_should) ?
              matcher.failure_message_for_should :
              matcher.failure_message
  if matcher.respond_to?(:diffable?) && matcher.diffable?
    if RSpec::Matchers::DSL::Matcher === matcher
      ::RSpec::Expectations.fail_with message, matcher.expected_as_array, matcher.actual
    else
      ::RSpec::Expectations.fail_with message, matcher.expected, matcher.actual
    end
  else
    ::RSpec::Expectations.fail_with message
  end
end