class RSpec::Mocks::Space

def proxy_for(object)

def proxy_for(object)
  id = id_for(object)
  proxies.fetch(id) do
    proxies[id] = case object
                  when NilClass   then ProxyForNil.new(expectation_ordering)
                  when TestDouble then object.__build_mock_proxy(expectation_ordering)
                  else
                    if RSpec::Mocks.configuration.verify_partial_doubles?
                      VerifyingPartialMockProxy.new(object, expectation_ordering)
                    else
                      PartialMockProxy.new(object, expectation_ordering)
                    end
                  end
  end
end