pact 1.1.0.rc2 → 1.1.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +0 -1
- data/CHANGELOG.md +46 -1
- data/Gemfile.lock +6 -4
- data/README.md +40 -186
- data/Rakefile +1 -1
- data/documentation/README.md +10 -0
- data/documentation/best-practices.md +33 -0
- data/documentation/configuration.md +166 -0
- data/documentation/diff_formatter_embedded.png +0 -0
- data/documentation/diff_formatter_list.png +0 -0
- data/documentation/diff_formatter_unix.png +0 -0
- data/documentation/faq.md +36 -6
- data/documentation/provider-states.md +173 -0
- data/documentation/raq.md +4 -4
- data/documentation/terminology.md +2 -2
- data/example/animal-service/Gemfile.lock +6 -9
- data/example/animal-service/Rakefile +2 -0
- data/example/animal-service/db/animal_db.sqlite3 +0 -0
- data/example/animal-service/lib/animal_service/animal_repository.rb +1 -5
- data/example/animal-service/lib/animal_service/api.rb +1 -1
- data/example/animal-service/spec/service_consumers/pact_helper.rb +7 -10
- data/example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb +5 -1
- data/example/zoo-app/Gemfile.lock +6 -9
- data/example/zoo-app/Rakefile +5 -0
- data/example/zoo-app/doc/markdown/README.md +3 -0
- data/example/zoo-app/doc/markdown/Zoo App - Animal Service.md +75 -0
- data/example/zoo-app/lib/zoo_app/animal_service_client.rb +2 -2
- data/example/zoo-app/spec/pacts/zoo_app-animal_service.json +1 -1
- data/example/zoo-app/spec/service_providers/animal_service_client_spec.rb +29 -34
- data/example/zoo-app/spec/service_providers/pact_helper.rb +4 -0
- data/lib/pact/configuration.rb +49 -1
- data/lib/pact/consumer/configuration.rb +4 -172
- data/lib/pact/consumer/configuration/configuration_extensions.rb +15 -0
- data/lib/pact/consumer/configuration/dsl.rb +12 -0
- data/lib/pact/consumer/configuration/mock_service.rb +89 -0
- data/lib/pact/consumer/configuration/service_consumer.rb +51 -0
- data/lib/pact/consumer/configuration/service_provider.rb +40 -0
- data/lib/pact/consumer/mock_service/interaction_mismatch.rb +3 -3
- data/lib/pact/consumer/mock_service/interaction_post.rb +2 -2
- data/lib/pact/consumer/mock_service/interaction_replay.rb +3 -4
- data/lib/pact/consumer/mock_service/verification_get.rb +32 -13
- data/lib/pact/consumer/rspec.rb +2 -4
- data/lib/pact/consumer/spec_hooks.rb +3 -1
- data/lib/pact/consumer_contract/consumer_contract.rb +1 -1
- data/lib/pact/consumer_contract/interaction.rb +1 -1
- data/lib/pact/doc/doc_file.rb +40 -0
- data/lib/pact/doc/generate.rb +11 -0
- data/lib/pact/doc/generator.rb +81 -0
- data/lib/pact/doc/interaction_view_model.rb +113 -0
- data/lib/pact/doc/markdown/generator.rb +26 -0
- data/lib/pact/doc/markdown/index_renderer.rb +41 -0
- data/lib/pact/doc/markdown/interaction.erb +14 -0
- data/lib/pact/doc/markdown/interaction_renderer.rb +38 -0
- data/lib/pact/doc/markdown/interactions_renderer.rb +56 -0
- data/lib/pact/doc/sort_interactions.rb +17 -0
- data/lib/pact/matchers/actual_type.rb +16 -0
- data/lib/pact/matchers/base_difference.rb +37 -0
- data/lib/pact/matchers/differ.rb +150 -0
- data/lib/pact/matchers/difference.rb +5 -30
- data/lib/pact/matchers/difference_indicator.rb +26 -0
- data/lib/pact/matchers/embedded_diff_formatter.rb +62 -0
- data/lib/pact/matchers/expected_type.rb +35 -0
- data/lib/pact/matchers/index_not_found.rb +3 -12
- data/lib/pact/matchers/{diff_decorator.rb → list_diff_formatter.rb} +28 -11
- data/lib/pact/matchers/matchers.rb +35 -39
- data/lib/pact/matchers/no_diff_indicator.rb +18 -0
- data/lib/pact/matchers/regexp_difference.rb +13 -0
- data/lib/pact/matchers/type_difference.rb +16 -0
- data/lib/pact/matchers/unexpected_index.rb +3 -13
- data/lib/pact/matchers/unexpected_key.rb +3 -12
- data/lib/pact/matchers/{plus_minus_diff_decorator.rb → unix_diff_formatter.rb} +22 -7
- data/lib/pact/provider/configuration.rb +5 -178
- data/lib/pact/provider/configuration/configuration_extension.rb +58 -0
- data/lib/pact/provider/configuration/dsl.rb +13 -0
- data/lib/pact/provider/configuration/pact_verification.rb +46 -0
- data/lib/pact/provider/configuration/service_provider_config.rb +16 -0
- data/lib/pact/provider/configuration/service_provider_dsl.rb +54 -0
- data/lib/pact/provider/matchers.rb +21 -13
- data/lib/pact/provider/matchers/messages.rb +43 -0
- data/lib/pact/provider/pact_spec_runner.rb +8 -0
- data/lib/pact/provider/rspec.rb +1 -1
- data/lib/pact/provider/rspec/formatter.rb +9 -7
- data/lib/pact/{consumer_contract → shared}/active_support_support.rb +4 -0
- data/lib/pact/shared/jruby_support.rb +18 -0
- data/lib/pact/shared/key_not_found.rb +3 -16
- data/lib/pact/shared/request.rb +5 -5
- data/lib/pact/term.rb +2 -2
- data/lib/pact/version.rb +1 -1
- data/pact.gemspec +2 -2
- data/spec/integration/pact/provider_configuration_spec.rb +2 -1
- data/spec/lib/pact/configuration_spec.rb +73 -0
- data/spec/lib/pact/consumer/mock_service/interaction_mismatch_spec.rb +21 -3
- data/spec/lib/pact/consumer/mock_service/verification_get_spec.rb +134 -0
- data/spec/lib/pact/consumer/request_spec.rb +1 -1
- data/spec/lib/pact/consumer_contract/active_support_support_spec.rb +1 -1
- data/spec/lib/pact/doc/generator_spec.rb +69 -0
- data/spec/lib/pact/doc/interaction_view_model_spec.rb +112 -0
- data/spec/lib/pact/doc/markdown/index_renderer_spec.rb +29 -0
- data/spec/lib/pact/doc/markdown/interactions_renderer_spec.rb +29 -0
- data/spec/lib/pact/matchers/differ_spec.rb +214 -0
- data/spec/lib/pact/matchers/difference_spec.rb +2 -12
- data/spec/lib/pact/matchers/embedded_diff_formatter_spec.rb +77 -0
- data/spec/lib/pact/matchers/index_not_found_spec.rb +21 -0
- data/spec/lib/pact/matchers/list_diff_formatter_spec.rb +114 -0
- data/spec/lib/pact/matchers/matchers_spec.rb +38 -22
- data/spec/lib/pact/matchers/regexp_difference_spec.rb +20 -0
- data/spec/lib/pact/matchers/type_difference_spec.rb +34 -0
- data/spec/lib/pact/matchers/unexpected_index_spec.rb +20 -0
- data/spec/lib/pact/matchers/unexpected_key_spec.rb +20 -0
- data/spec/lib/pact/matchers/{plus_minus_diff_decorator_spec.rb → unix_diff_formatter_spec.rb} +35 -6
- data/spec/lib/pact/provider/configuration/configuration_extension_spec.rb +30 -0
- data/spec/lib/pact/provider/configuration/pact_verification_spec.rb +43 -0
- data/spec/lib/pact/provider/configuration/service_provider_config_spec.rb +21 -0
- data/spec/lib/pact/provider/configuration/service_provider_dsl_spec.rb +92 -0
- data/spec/lib/pact/provider/configuration_spec.rb +7 -150
- data/spec/lib/pact/provider/matchers/messages_spec.rb +104 -0
- data/spec/lib/pact/provider/rspec/formatter_spec.rb +56 -0
- data/spec/lib/pact/shared/key_not_found_spec.rb +20 -0
- data/spec/lib/pact/shared/request_spec.rb +28 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/standalone/consumer_fail_test.rb +54 -0
- data/spec/standalone/consumer_pass_test.rb +50 -0
- data/spec/support/generated_index.md +4 -0
- data/spec/support/generated_markdown.md +55 -0
- data/spec/support/interaction_view_model.json +63 -0
- data/spec/support/markdown_pact.json +48 -0
- data/spec/support/pact_helper.rb +2 -1
- data/spec/support/spec_support.rb +7 -0
- data/spec/support/test_app_fail.json +11 -2
- data/tasks/pact-test.rake +9 -0
- metadata +113 -20
- data/example/animal-service/db/animals_db.sqlite3 +0 -0
- data/lib/pact/consumer/rspec/full_example_description.rb +0 -28
- data/lib/pact/matchers/nested_json_diff_decorator.rb +0 -53
- data/spec/lib/pact/matchers/diff_decorator_spec.rb +0 -80
- data/spec/lib/pact/matchers/nested_json_diff_decorator_spec.rb +0 -48
@@ -0,0 +1,48 @@
|
|
1
|
+
{
|
2
|
+
"provider": {
|
3
|
+
"name": "Some Provider"
|
4
|
+
},
|
5
|
+
"consumer": {
|
6
|
+
"name": "Some Consumer"
|
7
|
+
},
|
8
|
+
"interactions": [
|
9
|
+
{
|
10
|
+
"description": "a request for alligators",
|
11
|
+
"provider_state": "alligators exist",
|
12
|
+
"request": {
|
13
|
+
"method": "get",
|
14
|
+
"path": "/alligators"
|
15
|
+
},
|
16
|
+
"response": {
|
17
|
+
"headers" : {"Content-Type": "application/json"},
|
18
|
+
"status" : 200,
|
19
|
+
"body" : {
|
20
|
+
"alligators": [{
|
21
|
+
"name": "Bob",
|
22
|
+
"phoneNumber" : {
|
23
|
+
"json_class": "Pact::Term",
|
24
|
+
"data": {
|
25
|
+
"generate": "12345678",
|
26
|
+
"matcher": {"json_class":"Regexp","o":0,"s":"\\d+"}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}]
|
30
|
+
}
|
31
|
+
}
|
32
|
+
},{
|
33
|
+
"description": "a request for polar bears",
|
34
|
+
"provider_state": null,
|
35
|
+
"request": {
|
36
|
+
"method": "get",
|
37
|
+
"path": "/polar-bears"
|
38
|
+
},
|
39
|
+
"response": {
|
40
|
+
"headers" : {"Content-Type": "application/json"},
|
41
|
+
"status" : 404,
|
42
|
+
"body" : {
|
43
|
+
"message": "Sorry, due to climate change, the polar bears are currently unavailable."
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
]
|
48
|
+
}
|
data/spec/support/pact_helper.rb
CHANGED
@@ -7,7 +7,7 @@ module Pact
|
|
7
7
|
class TestApp
|
8
8
|
def call env
|
9
9
|
if env['PATH_INFO'] == '/weather'
|
10
|
-
[200, {'Content-Type' => 'application/json'}, [{message: WEATHER[:current_state]}.to_json]]
|
10
|
+
[200, {'Content-Type' => 'application/json'}, [{message: WEATHER[:current_state], :array => [{"foo"=> "blah"}]}.to_json]]
|
11
11
|
elsif env['PATH_INFO'] == '/sometext'
|
12
12
|
[200, {'Content-Type' => 'text/plain'}, ['some text']]
|
13
13
|
else
|
@@ -18,6 +18,7 @@ module Pact
|
|
18
18
|
|
19
19
|
Pact.configure do | config |
|
20
20
|
config.logger.level = Logger::DEBUG
|
21
|
+
config.diff_formatter = :unix
|
21
22
|
end
|
22
23
|
|
23
24
|
Pact.service_provider "Some Provider" do
|
@@ -16,7 +16,7 @@
|
|
16
16
|
"response": {
|
17
17
|
"status": 200,
|
18
18
|
"headers" : {"Content-type": "application/json"},
|
19
|
-
"body": {"message" : "this is not the weather you are looking for"}
|
19
|
+
"body": {"message" : "this is not the weather you are looking for", "array": [{"foo": "bar"}], "somethingElse" : {"blah" : {"nested" : "that is missing"} }}
|
20
20
|
|
21
21
|
},
|
22
22
|
"provider_state": "the weather is cloudy"
|
@@ -29,7 +29,16 @@
|
|
29
29
|
},
|
30
30
|
"response": {
|
31
31
|
"status": 200,
|
32
|
-
"headers" : {
|
32
|
+
"headers" : {
|
33
|
+
"Content-type": {
|
34
|
+
"json_class": "Pact::Term",
|
35
|
+
"data": {
|
36
|
+
"generate": "application/hal+json",
|
37
|
+
"matcher": {"json_class":"Regexp","o":0,"s":"hal"}
|
38
|
+
}
|
39
|
+
},
|
40
|
+
"X-Special-Header": "something"
|
41
|
+
},
|
33
42
|
"body": {"message" : "this is not the weather you are looking for"}
|
34
43
|
|
35
44
|
}
|
data/tasks/pact-test.rake
CHANGED
@@ -20,6 +20,14 @@ Pact::VerificationTask.new(:term) do | pact |
|
|
20
20
|
pact.uri './spec/support/term.json'
|
21
21
|
end
|
22
22
|
|
23
|
+
RSpec::Core::RakeTask.new('spec:standalone:fail') do | task |
|
24
|
+
task.pattern = FileList["spec/standalone/**/*_fail_test.rb"]
|
25
|
+
end
|
26
|
+
|
27
|
+
RSpec::Core::RakeTask.new('spec:standalone:pass') do | task |
|
28
|
+
task.pattern = FileList["spec/standalone/**/*_pass_test.rb"]
|
29
|
+
end
|
30
|
+
|
23
31
|
namespace :pact do
|
24
32
|
|
25
33
|
desc 'Runs pact tests against a sample application, testing failure and success.'
|
@@ -42,6 +50,7 @@ namespace :pact do
|
|
42
50
|
expect_to_pass "bundle exec rake pact:verify"
|
43
51
|
expect_to_pass "bundle exec rake pact:verify:at[./spec/support/test_app_pass.json]"
|
44
52
|
expect_to_fail "bundle exec rake pact:verify:at[./spec/support/test_app_fail.json]"
|
53
|
+
expect_to_fail "bundle exec rake spec:standalone:fail"
|
45
54
|
|
46
55
|
puts "Task pact:tests completed succesfully."
|
47
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pact
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0.
|
4
|
+
version: 1.1.0.rc3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2014-
|
16
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: randexp
|
@@ -144,21 +144,21 @@ dependencies:
|
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '0'
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
|
-
name:
|
147
|
+
name: term-ansicolor
|
148
148
|
requirement: !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - ~>
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: '0'
|
153
|
+
version: '1.0'
|
154
154
|
type: :runtime
|
155
155
|
prerelease: false
|
156
156
|
version_requirements: !ruby/object:Gem::Requirement
|
157
157
|
none: false
|
158
158
|
requirements:
|
159
|
-
- -
|
159
|
+
- - ~>
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: '0'
|
161
|
+
version: '1.0'
|
162
162
|
- !ruby/object:Gem::Dependency
|
163
163
|
name: rake
|
164
164
|
requirement: !ruby/object:Gem::Requirement
|
@@ -298,8 +298,15 @@ files:
|
|
298
298
|
- bethtest.rb
|
299
299
|
- bin/pact
|
300
300
|
- config.ru
|
301
|
+
- documentation/README.md
|
301
302
|
- documentation/Testing with pact.png
|
303
|
+
- documentation/best-practices.md
|
304
|
+
- documentation/configuration.md
|
305
|
+
- documentation/diff_formatter_embedded.png
|
306
|
+
- documentation/diff_formatter_list.png
|
307
|
+
- documentation/diff_formatter_unix.png
|
302
308
|
- documentation/faq.md
|
309
|
+
- documentation/provider-states.md
|
303
310
|
- documentation/raq.md
|
304
311
|
- documentation/terminology.md
|
305
312
|
- example/animal-service/Gemfile
|
@@ -307,7 +314,6 @@ files:
|
|
307
314
|
- example/animal-service/Rakefile
|
308
315
|
- example/animal-service/config.ru
|
309
316
|
- example/animal-service/db/animal_db.sqlite3
|
310
|
-
- example/animal-service/db/animals_db.sqlite3
|
311
317
|
- example/animal-service/lib/animal_service/animal_repository.rb
|
312
318
|
- example/animal-service/lib/animal_service/api.rb
|
313
319
|
- example/animal-service/lib/animal_service/db.rb
|
@@ -315,6 +321,9 @@ files:
|
|
315
321
|
- example/animal-service/spec/service_consumers/provider_states_for_zoo_app.rb
|
316
322
|
- example/zoo-app/Gemfile
|
317
323
|
- example/zoo-app/Gemfile.lock
|
324
|
+
- example/zoo-app/Rakefile
|
325
|
+
- example/zoo-app/doc/markdown/README.md
|
326
|
+
- example/zoo-app/doc/markdown/Zoo App - Animal Service.md
|
318
327
|
- example/zoo-app/lib/zoo_app/animal_service_client.rb
|
319
328
|
- example/zoo-app/lib/zoo_app/models/alligator.rb
|
320
329
|
- example/zoo-app/spec/pacts/zoo_app-animal_service.json
|
@@ -327,6 +336,11 @@ files:
|
|
327
336
|
- lib/pact/consumer.rb
|
328
337
|
- lib/pact/consumer/app_manager.rb
|
329
338
|
- lib/pact/consumer/configuration.rb
|
339
|
+
- lib/pact/consumer/configuration/configuration_extensions.rb
|
340
|
+
- lib/pact/consumer/configuration/dsl.rb
|
341
|
+
- lib/pact/consumer/configuration/mock_service.rb
|
342
|
+
- lib/pact/consumer/configuration/service_consumer.rb
|
343
|
+
- lib/pact/consumer/configuration/service_provider.rb
|
330
344
|
- lib/pact/consumer/consumer_contract_builder.rb
|
331
345
|
- lib/pact/consumer/consumer_contract_builders.rb
|
332
346
|
- lib/pact/consumer/interaction_builder.rb
|
@@ -347,11 +361,9 @@ files:
|
|
347
361
|
- lib/pact/consumer/mock_service_interaction_expectation.rb
|
348
362
|
- lib/pact/consumer/request.rb
|
349
363
|
- lib/pact/consumer/rspec.rb
|
350
|
-
- lib/pact/consumer/rspec/full_example_description.rb
|
351
364
|
- lib/pact/consumer/server.rb
|
352
365
|
- lib/pact/consumer/spec_hooks.rb
|
353
366
|
- lib/pact/consumer_contract.rb
|
354
|
-
- lib/pact/consumer_contract/active_support_support.rb
|
355
367
|
- lib/pact/consumer_contract/consumer_contract.rb
|
356
368
|
- lib/pact/consumer_contract/file_name.rb
|
357
369
|
- lib/pact/consumer_contract/interaction.rb
|
@@ -359,20 +371,44 @@ files:
|
|
359
371
|
- lib/pact/consumer_contract/request.rb
|
360
372
|
- lib/pact/consumer_contract/service_consumer.rb
|
361
373
|
- lib/pact/consumer_contract/service_provider.rb
|
374
|
+
- lib/pact/doc/doc_file.rb
|
375
|
+
- lib/pact/doc/generate.rb
|
376
|
+
- lib/pact/doc/generator.rb
|
377
|
+
- lib/pact/doc/interaction_view_model.rb
|
378
|
+
- lib/pact/doc/markdown/generator.rb
|
379
|
+
- lib/pact/doc/markdown/index_renderer.rb
|
380
|
+
- lib/pact/doc/markdown/interaction.erb
|
381
|
+
- lib/pact/doc/markdown/interaction_renderer.rb
|
382
|
+
- lib/pact/doc/markdown/interactions_renderer.rb
|
383
|
+
- lib/pact/doc/sort_interactions.rb
|
362
384
|
- lib/pact/logging.rb
|
363
385
|
- lib/pact/matchers.rb
|
364
|
-
- lib/pact/matchers/
|
386
|
+
- lib/pact/matchers/actual_type.rb
|
387
|
+
- lib/pact/matchers/base_difference.rb
|
388
|
+
- lib/pact/matchers/differ.rb
|
365
389
|
- lib/pact/matchers/difference.rb
|
390
|
+
- lib/pact/matchers/difference_indicator.rb
|
391
|
+
- lib/pact/matchers/embedded_diff_formatter.rb
|
392
|
+
- lib/pact/matchers/expected_type.rb
|
366
393
|
- lib/pact/matchers/index_not_found.rb
|
394
|
+
- lib/pact/matchers/list_diff_formatter.rb
|
367
395
|
- lib/pact/matchers/matchers.rb
|
368
|
-
- lib/pact/matchers/
|
369
|
-
- lib/pact/matchers/
|
396
|
+
- lib/pact/matchers/no_diff_indicator.rb
|
397
|
+
- lib/pact/matchers/regexp_difference.rb
|
398
|
+
- lib/pact/matchers/type_difference.rb
|
370
399
|
- lib/pact/matchers/unexpected_index.rb
|
371
400
|
- lib/pact/matchers/unexpected_key.rb
|
401
|
+
- lib/pact/matchers/unix_diff_formatter.rb
|
372
402
|
- lib/pact/provider.rb
|
373
403
|
- lib/pact/provider/client_project_pact_helper.rb
|
374
404
|
- lib/pact/provider/configuration.rb
|
405
|
+
- lib/pact/provider/configuration/configuration_extension.rb
|
406
|
+
- lib/pact/provider/configuration/dsl.rb
|
407
|
+
- lib/pact/provider/configuration/pact_verification.rb
|
408
|
+
- lib/pact/provider/configuration/service_provider_config.rb
|
409
|
+
- lib/pact/provider/configuration/service_provider_dsl.rb
|
375
410
|
- lib/pact/provider/matchers.rb
|
411
|
+
- lib/pact/provider/matchers/messages.rb
|
376
412
|
- lib/pact/provider/pact_helper_locator.rb
|
377
413
|
- lib/pact/provider/pact_spec_runner.rb
|
378
414
|
- lib/pact/provider/pact_verification.rb
|
@@ -389,7 +425,9 @@ files:
|
|
389
425
|
- lib/pact/provider/verification_report.rb
|
390
426
|
- lib/pact/provider/world.rb
|
391
427
|
- lib/pact/reification.rb
|
428
|
+
- lib/pact/shared/active_support_support.rb
|
392
429
|
- lib/pact/shared/dsl.rb
|
430
|
+
- lib/pact/shared/jruby_support.rb
|
393
431
|
- lib/pact/shared/key_not_found.rb
|
394
432
|
- lib/pact/shared/null_expectation.rb
|
395
433
|
- lib/pact/shared/request.rb
|
@@ -421,6 +459,7 @@ files:
|
|
421
459
|
- spec/lib/pact/consumer/mock_service/interaction_mismatch_spec.rb
|
422
460
|
- spec/lib/pact/consumer/mock_service/interaction_replay_spec.rb
|
423
461
|
- spec/lib/pact/consumer/mock_service/rack_request_helper_spec.rb
|
462
|
+
- spec/lib/pact/consumer/mock_service/verification_get_spec.rb
|
424
463
|
- spec/lib/pact/consumer/mock_service_interaction_expectation_spec.rb
|
425
464
|
- spec/lib/pact/consumer/request_spec.rb
|
426
465
|
- spec/lib/pact/consumer/service_consumer_spec.rb
|
@@ -428,16 +467,32 @@ files:
|
|
428
467
|
- spec/lib/pact/consumer_contract/consumer_contract_spec.rb
|
429
468
|
- spec/lib/pact/consumer_contract/interaction_spec.rb
|
430
469
|
- spec/lib/pact/consumer_contract/request_spec.rb
|
431
|
-
- spec/lib/pact/
|
470
|
+
- spec/lib/pact/doc/generator_spec.rb
|
471
|
+
- spec/lib/pact/doc/interaction_view_model_spec.rb
|
472
|
+
- spec/lib/pact/doc/markdown/index_renderer_spec.rb
|
473
|
+
- spec/lib/pact/doc/markdown/interactions_renderer_spec.rb
|
474
|
+
- spec/lib/pact/matchers/differ_spec.rb
|
432
475
|
- spec/lib/pact/matchers/difference_spec.rb
|
476
|
+
- spec/lib/pact/matchers/embedded_diff_formatter_spec.rb
|
477
|
+
- spec/lib/pact/matchers/index_not_found_spec.rb
|
478
|
+
- spec/lib/pact/matchers/list_diff_formatter_spec.rb
|
433
479
|
- spec/lib/pact/matchers/matchers_spec.rb
|
434
|
-
- spec/lib/pact/matchers/
|
435
|
-
- spec/lib/pact/matchers/
|
480
|
+
- spec/lib/pact/matchers/regexp_difference_spec.rb
|
481
|
+
- spec/lib/pact/matchers/type_difference_spec.rb
|
482
|
+
- spec/lib/pact/matchers/unexpected_index_spec.rb
|
483
|
+
- spec/lib/pact/matchers/unexpected_key_spec.rb
|
484
|
+
- spec/lib/pact/matchers/unix_diff_formatter_spec.rb
|
485
|
+
- spec/lib/pact/provider/configuration/configuration_extension_spec.rb
|
486
|
+
- spec/lib/pact/provider/configuration/pact_verification_spec.rb
|
487
|
+
- spec/lib/pact/provider/configuration/service_provider_config_spec.rb
|
488
|
+
- spec/lib/pact/provider/configuration/service_provider_dsl_spec.rb
|
436
489
|
- spec/lib/pact/provider/configuration_spec.rb
|
490
|
+
- spec/lib/pact/provider/matchers/messages_spec.rb
|
437
491
|
- spec/lib/pact/provider/pact_helper_locator_spec.rb
|
438
492
|
- spec/lib/pact/provider/pact_spec_runner_spec.rb
|
439
493
|
- spec/lib/pact/provider/print_missing_provider_states_spec.rb
|
440
494
|
- spec/lib/pact/provider/request_spec.rb
|
495
|
+
- spec/lib/pact/provider/rspec/formatter_spec.rb
|
441
496
|
- spec/lib/pact/provider/rspec_spec.rb
|
442
497
|
- spec/lib/pact/provider/state/provider_state_manager_spec.rb
|
443
498
|
- spec/lib/pact/provider/state/provider_state_proxy_spec.rb
|
@@ -445,20 +500,29 @@ files:
|
|
445
500
|
- spec/lib/pact/provider/world_spec.rb
|
446
501
|
- spec/lib/pact/reification_spec.rb
|
447
502
|
- spec/lib/pact/shared/dsl_spec.rb
|
503
|
+
- spec/lib/pact/shared/key_not_found_spec.rb
|
504
|
+
- spec/lib/pact/shared/request_spec.rb
|
448
505
|
- spec/lib/pact/something_like_spec.rb
|
449
506
|
- spec/lib/pact/tasks/task_helper_spec.rb
|
450
507
|
- spec/lib/pact/term_spec.rb
|
451
508
|
- spec/lib/pact/verification_task_spec.rb
|
452
509
|
- spec/spec_helper.rb
|
510
|
+
- spec/standalone/consumer_fail_test.rb
|
511
|
+
- spec/standalone/consumer_pass_test.rb
|
453
512
|
- spec/support/a_consumer-a_producer.json
|
454
513
|
- spec/support/a_consumer-a_provider.json
|
455
514
|
- spec/support/app_for_config_ru.rb
|
456
515
|
- spec/support/consumer_contract_template.json
|
457
516
|
- spec/support/dsl_spec_support.rb
|
458
517
|
- spec/support/factories.rb
|
518
|
+
- spec/support/generated_index.md
|
519
|
+
- spec/support/generated_markdown.md
|
520
|
+
- spec/support/interaction_view_model.json
|
521
|
+
- spec/support/markdown_pact.json
|
459
522
|
- spec/support/missing_provider_states_output.txt
|
460
523
|
- spec/support/pact_helper.rb
|
461
524
|
- spec/support/shared_examples_for_request.rb
|
525
|
+
- spec/support/spec_support.rb
|
462
526
|
- spec/support/stubbing.json
|
463
527
|
- spec/support/stubbing.rb
|
464
528
|
- spec/support/stubbing_using_allow.rb
|
@@ -467,7 +531,7 @@ files:
|
|
467
531
|
- spec/support/test_app_pass.json
|
468
532
|
- tasks/pact-test.rake
|
469
533
|
- tasks/spec.rake
|
470
|
-
homepage: https://github.com/realestate-com-au/pact
|
534
|
+
homepage: https://github.com/realestate-com-au/pact
|
471
535
|
licenses:
|
472
536
|
- MIT
|
473
537
|
post_install_message:
|
@@ -480,6 +544,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
480
544
|
- - ! '>='
|
481
545
|
- !ruby/object:Gem::Version
|
482
546
|
version: '0'
|
547
|
+
segments:
|
548
|
+
- 0
|
549
|
+
hash: -2322515558717640410
|
483
550
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
484
551
|
none: false
|
485
552
|
requirements:
|
@@ -512,6 +579,7 @@ test_files:
|
|
512
579
|
- spec/lib/pact/consumer/mock_service/interaction_mismatch_spec.rb
|
513
580
|
- spec/lib/pact/consumer/mock_service/interaction_replay_spec.rb
|
514
581
|
- spec/lib/pact/consumer/mock_service/rack_request_helper_spec.rb
|
582
|
+
- spec/lib/pact/consumer/mock_service/verification_get_spec.rb
|
515
583
|
- spec/lib/pact/consumer/mock_service_interaction_expectation_spec.rb
|
516
584
|
- spec/lib/pact/consumer/request_spec.rb
|
517
585
|
- spec/lib/pact/consumer/service_consumer_spec.rb
|
@@ -519,16 +587,32 @@ test_files:
|
|
519
587
|
- spec/lib/pact/consumer_contract/consumer_contract_spec.rb
|
520
588
|
- spec/lib/pact/consumer_contract/interaction_spec.rb
|
521
589
|
- spec/lib/pact/consumer_contract/request_spec.rb
|
522
|
-
- spec/lib/pact/
|
590
|
+
- spec/lib/pact/doc/generator_spec.rb
|
591
|
+
- spec/lib/pact/doc/interaction_view_model_spec.rb
|
592
|
+
- spec/lib/pact/doc/markdown/index_renderer_spec.rb
|
593
|
+
- spec/lib/pact/doc/markdown/interactions_renderer_spec.rb
|
594
|
+
- spec/lib/pact/matchers/differ_spec.rb
|
523
595
|
- spec/lib/pact/matchers/difference_spec.rb
|
596
|
+
- spec/lib/pact/matchers/embedded_diff_formatter_spec.rb
|
597
|
+
- spec/lib/pact/matchers/index_not_found_spec.rb
|
598
|
+
- spec/lib/pact/matchers/list_diff_formatter_spec.rb
|
524
599
|
- spec/lib/pact/matchers/matchers_spec.rb
|
525
|
-
- spec/lib/pact/matchers/
|
526
|
-
- spec/lib/pact/matchers/
|
600
|
+
- spec/lib/pact/matchers/regexp_difference_spec.rb
|
601
|
+
- spec/lib/pact/matchers/type_difference_spec.rb
|
602
|
+
- spec/lib/pact/matchers/unexpected_index_spec.rb
|
603
|
+
- spec/lib/pact/matchers/unexpected_key_spec.rb
|
604
|
+
- spec/lib/pact/matchers/unix_diff_formatter_spec.rb
|
605
|
+
- spec/lib/pact/provider/configuration/configuration_extension_spec.rb
|
606
|
+
- spec/lib/pact/provider/configuration/pact_verification_spec.rb
|
607
|
+
- spec/lib/pact/provider/configuration/service_provider_config_spec.rb
|
608
|
+
- spec/lib/pact/provider/configuration/service_provider_dsl_spec.rb
|
527
609
|
- spec/lib/pact/provider/configuration_spec.rb
|
610
|
+
- spec/lib/pact/provider/matchers/messages_spec.rb
|
528
611
|
- spec/lib/pact/provider/pact_helper_locator_spec.rb
|
529
612
|
- spec/lib/pact/provider/pact_spec_runner_spec.rb
|
530
613
|
- spec/lib/pact/provider/print_missing_provider_states_spec.rb
|
531
614
|
- spec/lib/pact/provider/request_spec.rb
|
615
|
+
- spec/lib/pact/provider/rspec/formatter_spec.rb
|
532
616
|
- spec/lib/pact/provider/rspec_spec.rb
|
533
617
|
- spec/lib/pact/provider/state/provider_state_manager_spec.rb
|
534
618
|
- spec/lib/pact/provider/state/provider_state_proxy_spec.rb
|
@@ -536,20 +620,29 @@ test_files:
|
|
536
620
|
- spec/lib/pact/provider/world_spec.rb
|
537
621
|
- spec/lib/pact/reification_spec.rb
|
538
622
|
- spec/lib/pact/shared/dsl_spec.rb
|
623
|
+
- spec/lib/pact/shared/key_not_found_spec.rb
|
624
|
+
- spec/lib/pact/shared/request_spec.rb
|
539
625
|
- spec/lib/pact/something_like_spec.rb
|
540
626
|
- spec/lib/pact/tasks/task_helper_spec.rb
|
541
627
|
- spec/lib/pact/term_spec.rb
|
542
628
|
- spec/lib/pact/verification_task_spec.rb
|
543
629
|
- spec/spec_helper.rb
|
630
|
+
- spec/standalone/consumer_fail_test.rb
|
631
|
+
- spec/standalone/consumer_pass_test.rb
|
544
632
|
- spec/support/a_consumer-a_producer.json
|
545
633
|
- spec/support/a_consumer-a_provider.json
|
546
634
|
- spec/support/app_for_config_ru.rb
|
547
635
|
- spec/support/consumer_contract_template.json
|
548
636
|
- spec/support/dsl_spec_support.rb
|
549
637
|
- spec/support/factories.rb
|
638
|
+
- spec/support/generated_index.md
|
639
|
+
- spec/support/generated_markdown.md
|
640
|
+
- spec/support/interaction_view_model.json
|
641
|
+
- spec/support/markdown_pact.json
|
550
642
|
- spec/support/missing_provider_states_output.txt
|
551
643
|
- spec/support/pact_helper.rb
|
552
644
|
- spec/support/shared_examples_for_request.rb
|
645
|
+
- spec/support/spec_support.rb
|
553
646
|
- spec/support/stubbing.json
|
554
647
|
- spec/support/stubbing.rb
|
555
648
|
- spec/support/stubbing_using_allow.rb
|
File without changes
|
@@ -1,28 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Creates the full description for an example group
|
3
|
-
#
|
4
|
-
module Pact
|
5
|
-
module Consumer
|
6
|
-
module RSpec
|
7
|
-
class FullExampleDescription
|
8
|
-
|
9
|
-
def initialize example
|
10
|
-
@example = example
|
11
|
-
end
|
12
|
-
|
13
|
-
def parent_group_descriptions
|
14
|
-
@example.example.example_group.parent_groups.collect(&:description).reverse
|
15
|
-
end
|
16
|
-
|
17
|
-
def example_description
|
18
|
-
@example.example.description
|
19
|
-
end
|
20
|
-
|
21
|
-
def to_s
|
22
|
-
(parent_group_descriptions + [example_description]).join(" ")
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|