Sha256: 9d60e966900649fdd351c83e9c9aebae16dd13e7f947b8a3ffe79213fc9f6fc2
Contents?: true
Size: 933 Bytes
Versions: 112
Compression:
Stored size: 933 Bytes
Contents
require 'spec_helper' require 'spec/support/test_data_builder' require 'pact_broker/api/decorators/representable_pact' module PactBroker::Api::Decorators describe RepresentablePact do let(:pact) { TestDataBuilder.new.create_pact_with_hierarchy('Consumer', '1.2.3', 'Provider').and_return(:pact) } subject { RepresentablePact.new(pact) } describe "initialize" do it "creates an object with a provider with a name" do expect(subject.provider.name).to eq 'Provider' end it "creates an object with a provider with a nil version" do expect(subject.provider.version).to be_nil end it "creates an object with a consumer with a name" do expect(subject.consumer.name).to eq 'Consumer' end it "creates an object with a consumer that has the current pact's version" do expect(subject.consumer.version.number).to eq '1.2.3' end end end end
Version data entries
112 entries across 112 versions & 1 rubygems