Module: Pact::Provider::RSpec::ClassMethods
Instance Method Summary collapse
- #honour_consumer_contract(consumer_contract, options = {}) ⇒ Object
- #honour_pactfile(pactfile_uri, options = {}) ⇒ Object
Instance Method Details
#honour_consumer_contract(consumer_contract, options = {}) ⇒ Object
31 32 33 |
# File 'lib/pact/provider/rspec.rb', line 31 def honour_consumer_contract consumer_contract, = {} describe_consumer_contract consumer_contract, .merge({:consumer => consumer_contract.consumer.name}) end |
#honour_pactfile(pactfile_uri, options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/pact/provider/rspec.rb', line 21 def honour_pactfile pactfile_uri, = {} puts "Filtering specs by: #{[:criteria]}" if [:criteria] consumer_contract = Pact::ConsumerContract.from_json(read_pact_from(pactfile_uri, )) describe "A pact between #{consumer_contract.consumer.name} and #{consumer_contract.provider.name}" do describe "in #{pactfile_uri}" do honour_consumer_contract consumer_contract, end end end |