module Aws::ClientStubs

def setup_stubbing

Other tags:
    Api: - private
def setup_stubbing
  @stubs = {}
  @stub_mutex = Mutex.new
  if Hash === @config.stub_responses
    @config.stub_responses.each do |operation_name, stubs|
      apply_stubs(operation_name, Array === stubs ? stubs : [stubs])
    end
    @config.stub_responses = true
  end
  # When a client is stubbed allow the user to access the requests made
  @api_requests = []
  requests = @api_requests
  self.handle do |context|
    requests << {
      operation_name: context.operation_name,
      params: context.params,
      context: context
    }
    @handler.call(context)
  end
end