File tree 3 files changed +4
-2
lines changed
lib/pact/consumer_contract
3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 29
29
reports
30
30
Gemfile.lock
31
31
build
32
+ .byebug_history
32
33
33
34
vendor /bundle /
34
35
spec /examples.txt
Original file line number Diff line number Diff line change @@ -32,11 +32,11 @@ def to_json(options = {})
32
32
33
33
def sorted_interactions
34
34
# Default order: chronological
35
- return consumer_contract . interactions if Pact . configuration . pactfile_write_order == :chronological
35
+ return consumer_contract . writable_interactions if Pact . configuration . pactfile_write_order == :chronological
36
36
# We are supporting only chronological or alphabetical order
37
37
raise NotImplementedError if Pact . configuration . pactfile_write_order != :alphabetical
38
38
39
- consumer_contract . interactions . sort { |a , b | sortable_id ( a ) <=> sortable_id ( b ) }
39
+ consumer_contract . writable_interactions . sort { |a , b | sortable_id ( a ) <=> sortable_id ( b ) }
40
40
end
41
41
42
42
def sortable_id interaction
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ def as_json options = {}
17
17
hash [ :providerState ] = interaction . provider_state if interaction . provider_state
18
18
hash [ :request ] = decorate_request . as_json ( options )
19
19
hash [ :response ] = decorate_response . as_json ( options )
20
+ hash [ :metadata ] = interaction . metadata
20
21
fix_all_the_things hash
21
22
end
22
23
You can’t perform that action at this time.
0 commit comments