Skip to content

Commit

Permalink
fix: use dummy pact specification version for stub server
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jul 23, 2018
1 parent b585092 commit 3337f6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/pact/mock_service/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'pact/consumer/mock_service/set_location'
require 'pact/mock_service/run'
require 'pact/mock_service/server/webrick_request_monkeypatch'
require 'pact/specification_version'

module Pact
module MockService
Expand Down Expand Up @@ -50,14 +51,15 @@ def call_shutdown_hooks
end

def service_options
# dummy pact_specification_version is needed to stop RequestHandlers blowing up
service_options = {
pact_dir: options[:pact_dir],
log_level: options[:log_level],
unique_pact_file_names: options[:unique_pact_file_names],
consumer: options[:consumer],
provider: options[:provider],
cors_enabled: options[:cors],
pact_specification_version: options[:pact_specification_version],
pact_specification_version: Pact::SpecificationVersion::NIL_VERSION.to_s,
pactfile_write_mode: options[:pact_file_write_mode],
stub_pactfile_paths: options[:stub_pactfile_paths]
}
Expand Down

0 comments on commit 3337f6d

Please sign in to comment.