Sha256: ad93b081f7673d0162e705294d8511948ec637873936f6d93bfa96262a052496

Contents?: true

Size: 581 Bytes

Versions: 24

Compression:

Stored size: 581 Bytes

Contents

module AWS
  module S3
    class FakeResponse
      attr_reader :code, :body, :headers
      def initialize(options = {})
        @code    = options.delete(:code)  || 200 
        @body    = options.delete(:body)  || ''
        @headers = {'content-type' => 'application/xml'}.merge(options.delete(:headers) || {})
      end

      # For ErrorResponse
      def response
        body
      end
      
      def [](header)
        headers[header]
      end
      
      def each(&block)
        headers.each(&block)
      end
      alias_method :each_header, :each
    end
  end
end

Version data entries

24 entries across 24 versions & 14 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/aws-s3-0.6.3/test/mocks/fake_response.rb
croaker-aws-s3-0.5.2.20090127001 test/mocks/fake_response.rb
croaker-aws-s3-0.5.2.20090127002 test/mocks/fake_response.rb
aws-s3-instructure-0.6.2.1352914936 test/mocks/fake_response.rb
aws-s3-0.6.3 test/mocks/fake_response.rb
mb-aws-s3-0.6.2 test/mocks/fake_response.rb
codders-aws-s3-0.6.2.1331721623 test/mocks/fake_response.rb
surat-aws-s3-0.0.1 test/mocks/fake_response.rb
aws-s3-instructure-0.6.2.1319643167 test/mocks/fake_response.rb
aws-s3-instructure-0.6.2.1319222580 test/mocks/fake_response.rb
codders-aws-s3-0.6.2 test/mocks/fake_response.rb
le88-aws-s3-0.6.4.1310482383 test/mocks/fake_response.rb
le88-aws-s3-0.6.3.1310482014 test/mocks/fake_response.rb
ghazel-aws-s3-0.6.4.1 test/mocks/fake_response.rb
aws-s3-akhtaboot-0.6.2.1288082910 test/mocks/fake_response.rb
jaf-s3-0.6.3.1286550476 test/mocks/fake_response.rb
fmalamitsas-aws-s3-0.6.2.1254423625 test/mocks/fake_response.rb
stevequinlan-aws-s3-0.6.3 test/mocks/fake_response.rb
sauberia-aws-s3-0.6.2.1254423624 test/mocks/fake_response.rb
aws-s3-0.5.0 test/mocks/fake_response.rb