From 3337f6da13c0a4d04942d6a98ec46c879138368a Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Mon, 23 Jul 2018 10:15:25 +1000 Subject: [PATCH] fix: use dummy pact specification version for stub server --- lib/pact/mock_service/run.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pact/mock_service/run.rb b/lib/pact/mock_service/run.rb index 16fbfed..6237d4f 100644 --- a/lib/pact/mock_service/run.rb +++ b/lib/pact/mock_service/run.rb @@ -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 @@ -50,6 +51,7 @@ 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], @@ -57,7 +59,7 @@ def service_options 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] }