File tree 2 files changed +7
-2
lines changed
lib/pact/mock_service/control_server
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ def control_server_options
54
54
pact_dir : options [ :pact_dir ] || "." ,
55
55
unique_pact_file_names : options [ :unique_pact_file_names ] ,
56
56
cors_enabled : options [ :cors ] || false ,
57
- ssl : options [ :ssl ]
57
+ ssl : options [ :ssl ] ,
58
+ pact_specification_version : options [ :pact_specification_version ]
58
59
}
59
60
end
60
61
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def mock_service_headers
22
22
23
23
before :all do
24
24
clear_dirs
25
- @pid = start_control 1234
25
+ @pid = start_control 1234 , "--pact-specification-version 3"
26
26
end
27
27
28
28
it "starts up and responds with mocked responses" do
@@ -49,6 +49,10 @@ def mock_service_headers
49
49
expect ( File . exist? ( 'tmp/pacts/consumer-provider.json' ) ) . to be true
50
50
end
51
51
52
+ it "writes the pacts with the specified in pact specification version" do
53
+ expect ( JSON . parse ( File . read ( 'tmp/pacts/consumer-provider.json' ) ) [ 'metadata' ] [ 'pactSpecification' ] [ 'version' ] ) . to eq '3.0.0'
54
+ end
55
+
52
56
after :all do
53
57
kill_server @pid
54
58
end
You can’t perform that action at this time.
0 commit comments