module RSpec::Mocks::TargetDelegationInstanceMethods
def define_matcher(matcher, name, &block)
def define_matcher(matcher, name, &block) matcher.__send__(name, target, &block) end
def matcher_allowed?(matcher)
def matcher_allowed?(matcher) Matchers::Matcher === matcher end
def raise_negation_unsupported(method_name, matcher)
def raise_negation_unsupported(method_name, matcher) raise NegationUnsupportedError, "`#{expression}(...).#{method_name} #{matcher.matcher_name}` is not supported since it " \ "doesn't really make sense. What would it even mean?" end
def raise_unsupported_matcher(method_name, matcher)
def raise_unsupported_matcher(method_name, matcher) raise UnsupportedMatcherError, "only the `receive`, `have_received` and `receive_messages` matchers are supported " \ "with `#{expression}(...).#{method_name}`, but you have provided: #{matcher}" end