Both pact 2.0 and pact-support (latest, 1.21.6) have a pact/rspec defined.
Which one do you get when you require "pact/rspec"? It depends on bundler load path ordering. In most cases it seems to load pact-support's and NOT pact's, and that means that pact's rspec integration is never loaded.
Example irb session:
>> $:.select { _1.include? "pact" }
=>
["/Users/bradleyschaefer/.local/share/mise/installs/ruby/3.4.9/lib/ruby/gems/3.4.0/gems/pact-support-1.21.6/lib",
"/Users/bradleyschaefer/.local/share/mise/installs/ruby/3.4.9/lib/ruby/gems/3.4.0/gems/pact-2.0.0/lib",
"/Users/bradleyschaefer/.local/share/mise/installs/ruby/3.4.9/lib/ruby/gems/3.4.0/gems/pact-ffi-0.4.28.0-arm64-darwin/lib"]
>> require "pact/rspec"
=> true
>> PactConsumerDsl # pact/rspec from pact would have loaded this
/Users/bradleyschaefer/Projects/domain-insight-service/spec/service_providers/pact_helper.rb(irb):3:in '<main>': uninitialized constant PactConsumerDsl (NameError)
The consequence is that you won't get things you need like http_pact_provider in an RSpec.describe tagged with pact: true, pact_entity: :provider
Solution
Unsure.
Is pact-support known/intentionally incompatible with 2.0?
Should pact-support be removed from projects that had been using it?
Both pact 2.0 and pact-support (latest, 1.21.6) have a pact/rspec defined.
Which one do you get when you
require "pact/rspec"? It depends on bundler load path ordering. In most cases it seems to loadpact-support's and NOTpact's, and that means that pact's rspec integration is never loaded.Example irb session:
The consequence is that you won't get things you need like
http_pact_providerin anRSpec.describetagged withpact: true, pact_entity: :providerSolution
Unsure.
Is
pact-supportknown/intentionally incompatible with 2.0?Should
pact-supportbe removed from projects that had been using it?