Skip to content

Commit

Permalink
chore: add example of fail_if_no_pacts_found from pact broker
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Aug 6, 2024
1 parent 69251dc commit db6e756
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion example/animal-service/spec/service_consumers/pact_helper.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
require 'pact/provider/rspec'

require "./spec/service_consumers/provider_states_for_zoo_app"
require_relative "./provider_states_for_zoo_app"

Pact.service_provider 'Animal Service' do

honours_pact_with "Zoo App" do
pact_uri '../zoo-app/spec/pacts/zoo_app-animal_service.json'
end

## For pact contracts from a Pact Broker

# honours_pacts_from_pact_broker do
# pact_broker_base_url 'http://localhost:9292'
# # fail_if_no_pacts_found false # defaults to true
# end

end

0 comments on commit db6e756

Please sign in to comment.