class RSpec::Mocks::AnyInstance::Proxy

def stub(method_name_or_method_map, &block)

def stub(method_name_or_method_map, &block)
  if Hash === method_name_or_method_map
    method_name_or_method_map.each do |method_name, return_value|
      stub(method_name).and_return(return_value)
    end
  else
    perform_proxying(__method__, [method_name_or_method_map], block) do |proxy|
      proxy.add_stub(method_name_or_method_map, &block)
    end
  end
end