class RSpec::Mocks::AnyInstance::Proxy

def should_receive(method_name, &block)

def should_receive(method_name, &block)
  perform_proxying(__method__, [method_name], block) do |proxy|
    # Yeah, this is a bit odd...but if we used `add_message_expectation`
    # then it would act like `expect_every_instance_of(klass).to receive`.
    # The any_instance recorder takes care of validating that an instance
    # received the message.
    proxy.add_stub(method_name, &block)
  end
end