From 303077d94c51581a97dbee154d214ca4fd2c6701 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Wed, 16 Sep 2020 10:18:28 +1000 Subject: [PATCH] feat: allow verification task to set just a pact_helper without a URI --- lib/pact/tasks/verification_task.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pact/tasks/verification_task.rb b/lib/pact/tasks/verification_task.rb index 644abf4d..bac650ab 100644 --- a/lib/pact/tasks/verification_task.rb +++ b/lib/pact/tasks/verification_task.rb @@ -31,6 +31,7 @@ class VerificationTask < ::Rake::TaskLib attr_reader :pact_spec_configs attr_accessor :rspec_opts attr_accessor :ignore_failures + attr_accessor :_pact_helper def initialize(name) @rspec_opts = nil @@ -41,6 +42,10 @@ def initialize(name) rake_task end + def pact_helper(pact_helper) + @pact_spec_configs << { pact_helper: pact_helper } + end + def uri(uri, options = {}) @pact_spec_configs << {uri: uri, pact_helper: options[:pact_helper]} end @@ -82,6 +87,7 @@ def rake_task Pact::TaskHelper.handle_verification_failure do exit_statuses.count{ | status | status != 0 } end + end end end