Sha256: 9307201a7d557006d064d219d17d4b9358fab100534132e77907f323772476ee

Contents?: true

Size: 656 Bytes

Versions: 9

Compression:

Stored size: 656 Bytes

Contents

module Pacto
  describe ResponseAdapter do
    let(:response) do
      double({
        :code => 200,
        :headers => {'foo' => ['bar', 'baz'], 'hello' => ['world']},
        :body => double('body')
      })
    end

    before do
      @response_adapter = described_class.new(response)
    end

    it 'should have a status' do
      @response_adapter.status.should == response.code
    end

    it 'should have a body' do
      @response_adapter.body.should == response.body
    end

    it 'should normalize headers values according to RFC2616' do
      @response_adapter.headers.should == {'foo' => 'bar,baz', 'hello' => 'world'}
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pacto-0.2.5 spec/unit/pacto/response_adapter_spec.rb
pacto-0.2.4 spec/unit/pacto/response_adapter_spec.rb
pacto-0.2.3 spec/unit/pacto/response_adapter_spec.rb
pacto-0.2.2 spec/unit/pacto/response_adapter_spec.rb
pacto-0.2.1 spec/unit/pacto/response_adapter_spec.rb
pacto-0.2.0 spec/pacto/response_adapter_spec.rb
pacto-0.1.1 spec/pacto/response_adapter_spec.rb
pacto-0.1.0 spec/pacto/response_adapter_spec.rb
pacto-0.0.1 spec/pacto/response_adapter_spec.rb