Sha256: 97150268c4bb26dbfc668375321e422d301922c9346bd0a3e4da5350fea3a66e

Contents?: true

Size: 515 Bytes

Versions: 11

Compression:

Stored size: 515 Bytes

Contents

require 'spec_helper'
require 'support/shared_examples_for_request'

module Pact
  describe Consumer::Request::Actual do
    it_behaves_like "a request"

    let(:raw_request) do
      {
        'method' => 'get',
        'path' => '/mallory'
      }
    end

    describe "from_hash" do
      context "when field are not defined" do
        subject { described_class.from_hash(raw_request) }
        it "raises an error" do
          expect{subject}.to raise_error KeyError
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pact-1.3.3 spec/lib/pact/consumer/request_spec.rb
pact-1.3.2 spec/lib/pact/consumer/request_spec.rb
pact-1.3.1 spec/lib/pact/consumer/request_spec.rb
pact-1.3.0 spec/lib/pact/consumer/request_spec.rb
pact-1.2.1.rc2 spec/lib/pact/consumer/request_spec.rb
pact-1.2.1.rc1 spec/lib/pact/consumer/request_spec.rb
pact-1.1.1 spec/lib/pact/consumer/request_spec.rb
pact-1.1.0 spec/lib/pact/consumer/request_spec.rb
pact-1.1.0.rc5 spec/lib/pact/consumer/request_spec.rb
pact-1.1.0.rc4 spec/lib/pact/consumer/request_spec.rb
pact-1.1.0.rc3 spec/lib/pact/consumer/request_spec.rb