Skip to content

Commit

Permalink
feat: allow verification task to set just a pact_helper without a URI
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Sep 16, 2020
1 parent f839391 commit 303077d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/pact/tasks/verification_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -82,6 +87,7 @@ def rake_task
Pact::TaskHelper.handle_verification_failure do
exit_statuses.count{ | status | status != 0 }
end

end
end
end
Expand Down

0 comments on commit 303077d

Please sign in to comment.