module RSpec::Expectations::ExpectationHelper

def self.with_matcher(handler, matcher, message)

def self.with_matcher(handler, matcher, message)
  check_message(message)
  matcher = modern_matcher_from(matcher)
  yield matcher
ensure
  ::RSpec::Matchers.last_expectation_handler = handler
  ::RSpec::Matchers.last_matcher = matcher
end