Skip to content

Commit

Permalink
fix: remove unused ConsumerContractBuilder contract_details accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Aug 6, 2024
1 parent c0db0b0 commit fb5488e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
6 changes: 3 additions & 3 deletions lib/pact/consumer/consumer_contract_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class ConsumerContractBuilder

include Pact::Logging

attr_reader :consumer_contract, :mock_service_base_url
attr_reader :mock_service_base_url

def initialize(attributes)
@interaction_builder = nil
@consumer_contract = {
@consumer_contract_details = {
consumer: {name: attributes[:consumer_name]},
provider: {name: attributes[:provider_name]},
pactfile_write_mode: attributes[:pactfile_write_mode].to_s,
Expand Down Expand Up @@ -46,7 +46,7 @@ def log msg
end

def write_pact
mock_service_client.write_pact @consumer_contract
mock_service_client.write_pact @consumer_contract_details
end

def wait_for_interactions options = {}
Expand Down
11 changes: 0 additions & 11 deletions spec/lib/pact/consumer/consumer_contract_builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,6 @@ module Consumer
end
end

describe "#consumer_contract" do
it "returns the consumer contract" do
expect(subject.consumer_contract).to eq(
consumer: { name: consumer_name },
provider: { name: provider_name },
pactfile_write_mode: 'overwrite',
pact_dir: pact_dir
)
end
end

describe "#mock_service_base_url" do

subject do
Expand Down

0 comments on commit fb5488e

Please sign in to comment.