Sha256: 75924606204bbb0fcdef64df496932477fb79ec288ade78bd4d3309199e2d8a8
Contents?: true
Size: 1.13 KB
Versions: 28
Compression:
Stored size: 1.13 KB
Contents
namespace :pact do desc "Verifies the pact files configured in the pact_helper.rb against this service provider." task :verify do require 'pact/provider' require 'pact/tasks/task_helper' require 'pact/provider/client_project_pact_helper' include Pact::TaskHelper handle_verification_failure do options = {criteria: spec_criteria} pact_verifications = Pact.configuration.pact_verifications verification_configs = pact_verifications.collect { | pact_verification | { :uri => pact_verification.uri }} raise "Please configure a pact to verify" if verification_configs.empty? Pact::Provider::PactSpecRunner.new(verification_configs, options).run end end desc "Verifies the pact at the given URI against this service provider." task 'verify:at', :pact_uri do | t, args | require 'pact/provider' require 'pact/tasks/task_helper' include Pact::TaskHelper handle_verification_failure do puts "Verifying pact at uri #{args[:pact_uri]}" options = {criteria: spec_criteria} Pact::Provider::PactSpecRunner.new([{uri: args[:pact_uri]}], options).run end end end
Version data entries
28 entries across 28 versions & 1 rubygems