module RSpec::Mocks::Methods

def __mock_proxy

def __mock_proxy
  @mock_proxy ||= begin
    mp = if Mock === self
      Proxy.new(self, @name, @options)
    else
      Proxy.new(self)
    end
    Serialization.fix_for(self)
    mp
  end
end