Skip to content

Commit 1a2d7c1

Browse files
committed
fix: add back missing output describing the interactions filter
1 parent e8aa08b commit 1a2d7c1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/pact/provider/rspec.rb

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ def honour_pactfile pact_source, pact_json, options
2626
Pact.configuration.output_stream.puts "INFO: Reading pact at #{pact_uri}"
2727
consumer_contract = Pact::ConsumerContract.from_json(pact_json)
2828
suffix = pact_uri.metadata[:pending] ? " [PENDING]": ""
29+
example_group_description = "Verifying a pact between #{consumer_contract.consumer.name} and #{consumer_contract.provider.name}#{suffix}"
30+
example_group_metadata = { pactfile_uri: pact_uri, pact_criteria: options[:criteria] }
2931

30-
::RSpec.describe "Verifying a pact between #{consumer_contract.consumer.name} and #{consumer_contract.provider.name}#{suffix}", pactfile_uri: pact_uri do
32+
::RSpec.describe example_group_description, example_group_metadata do
3133
honour_consumer_contract consumer_contract, options.merge(
3234
pact_json: pact_json,
3335
pact_uri: pact_uri,
@@ -90,8 +92,7 @@ def describe_interaction interaction, options
9092
pact_uri: options[:pact_uri],
9193
pact_source: options[:pact_source],
9294
pact_ignore_failures: options[:pact_source].pending? || options[:ignore_failures],
93-
pact_consumer_contract: options[:consumer_contract],
94-
pact_criteria: options[:criteria]
95+
pact_consumer_contract: options[:consumer_contract]
9596
}
9697

9798
describe description_for(interaction), metadata do

lib/pact/provider/rspec/formatter_rspec_3.rb

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def dump_summary(summary)
2525
C = ::Term::ANSIColor
2626

2727
def example_group_started(notification)
28+
# This is the metadata on the top level "Verifying a pact between X and Y" describe block
2829
if @group_level == 0
2930
Pact.configuration.output_stream.puts
3031
pact_uri = notification.group.metadata[:pactfile_uri]

0 commit comments

Comments
 (0)