Sha256: 1cee2c41edeae7048489125f2bd2e780ead5f3fd41329fff9ae66acfbb5c4cd4

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

# -*- encoding : utf-8 -*-
require 'unit/pacto/contract_spec'

module Pacto
  module Formats
    module Legacy
      describe Contract do
        let(:request_clause) do
          Pacto::Formats::Legacy::RequestClause.new(
            http_method: 'GET',
            host: 'http://example.com',
            path: '/',
            schema:  {
              type: 'object',
              required: true # , :properties => double('body definition properties')
            }
          )
        end

        let(:response_clause) do
          ResponseClause.new(status: 200)
        end
        let(:adapter) { double 'provider' }
        let(:file) { contract_file 'contract', 'legacy' }
        let(:consumer_driver) { double }
        let(:provider_actor) { double }

        subject(:contract) do
          described_class.new(
            request: request_clause,
            response: response_clause,
            file: file,
            name: 'sample'
          )
        end

        it_behaves_like 'a contract'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pacto-0.4.0.rc3 spec/unit/pacto/formats/legacy/contract_spec.rb
pacto-0.4.0.rc2 spec/unit/pacto/formats/legacy/contract_spec.rb