module Pact

@public Used by Pact Provider Verifier

TODO move this to the pact broker client

To create a rake pact:verify:<something> task

Pact::VerificationTask.new(:head) do | pact |

pact.uri 'http://master.cd.vpc.realestate.com.au/browse/BIQ-MAS/latestSuccessful/artifact/JOB2/Pacts/mas-contract_transaction_service.json'
 pact.uri 'http://master.cd.vpc.realestate.com.au/browse/BIQ-IMAGINARY-CONSUMER/latestSuccessful/artifact/JOB2/Pacts/imaginary_consumer-contract_transaction_service.json'

end

The pact.uri may be a local file system path or a remote URL.

To run a pact:verify:xxx task you need to define a pact_helper.rb, ideally in spec/service_consumers. It should contain your service_provider definition, and load any provider state definition files. It should also load all your app’s dependencies (eg by calling out to spec_helper)

Eg.

require ‘spec_helper’ require ‘provider_states_for_my_consumer’

Pact.service_provider “My Provider” do

app { TestApp.new }

end

Can’t use refinements because of Travelling Ruby

Remember to bump pact-provider-proxy when this changes major version