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

Version Path
pact-1.1.0 lib/tasks/pact.rake
pact-1.1.0.rc5 lib/tasks/pact.rake
pact-1.1.0.rc4 lib/tasks/pact.rake
pact-1.1.0.rc3 lib/tasks/pact.rake
pact-1.0.39 lib/tasks/pact.rake
pact-1.1.0.rc2 lib/tasks/pact.rake
pact-1.0.38 lib/tasks/pact.rake
pact-1.1.0.rc1 lib/tasks/pact.rake
pact-1.0.37 lib/tasks/pact.rake
pact-1.0.36 lib/tasks/pact.rake
pact-1.0.35 lib/tasks/pact.rake
pact-1.0.34 lib/tasks/pact.rake
pact-1.0.33 lib/tasks/pact.rake
pact-1.0.32 lib/tasks/pact.rake
pact-1.0.31 lib/tasks/pact.rake
pact-1.0.30 lib/tasks/pact.rake
pact-1.0.29 lib/tasks/pact.rake
pact-1.0.28 lib/tasks/pact.rake
pact-1.0.27 lib/tasks/pact.rake
pact-1.0.26 lib/tasks/pact.rake