class RSpec::Mocks::TargetBase

def self.delegate_not_to(matcher_method, options = {})

def self.delegate_not_to(matcher_method, options = {})
  method_name = options.fetch(:from)
  define_method(method_name) do |matcher, &block|
    case matcher
    when Matchers::Receive         then define_matcher(matcher, matcher_method, &block)
    when Matchers::ReceiveMessages then raise_negation_unsupported(method_name, matcher)
    else
      raise_unsupported_matcher(method_name, matcher)
    end
  end
end