Skip to content

Commit

Permalink
fix: add back missing output describing the interactions filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 9, 2020
1 parent e8aa08b commit 1a2d7c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/pact/provider/rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ def honour_pactfile pact_source, pact_json, options
Pact.configuration.output_stream.puts "INFO: Reading pact at #{pact_uri}"
consumer_contract = Pact::ConsumerContract.from_json(pact_json)
suffix = pact_uri.metadata[:pending] ? " [PENDING]": ""
example_group_description = "Verifying a pact between #{consumer_contract.consumer.name} and #{consumer_contract.provider.name}#{suffix}"
example_group_metadata = { pactfile_uri: pact_uri, pact_criteria: options[:criteria] }

::RSpec.describe "Verifying a pact between #{consumer_contract.consumer.name} and #{consumer_contract.provider.name}#{suffix}", pactfile_uri: pact_uri do
::RSpec.describe example_group_description, example_group_metadata do
honour_consumer_contract consumer_contract, options.merge(
pact_json: pact_json,
pact_uri: pact_uri,
Expand Down Expand Up @@ -90,8 +92,7 @@ def describe_interaction interaction, options
pact_uri: options[:pact_uri],
pact_source: options[:pact_source],
pact_ignore_failures: options[:pact_source].pending? || options[:ignore_failures],
pact_consumer_contract: options[:consumer_contract],
pact_criteria: options[:criteria]
pact_consumer_contract: options[:consumer_contract]
}

describe description_for(interaction), metadata do
Expand Down
1 change: 1 addition & 0 deletions lib/pact/provider/rspec/formatter_rspec_3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def dump_summary(summary)
C = ::Term::ANSIColor

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

0 comments on commit 1a2d7c1

Please sign in to comment.