pact-foundation / pact-mock_service

Provides a mock service for use with Pact
https://pact.io
MIT License
73 stars 69 forks source link

Support not writing interactions to pact file if marked #113

Closed thatguysimon closed 4 years ago

thatguysimon commented 5 years ago

1) Added metadata to InteractionDecorator. 1) Changed ConsumerContractDecorator#as_json to use ConsumerContract#writable_interactions

See https://github.com/pact-foundation/pact-support/pull/75

bethesque commented 4 years ago

@thatguysimon did you find this wasn't working? I updated my gems and discovered that my pact had metadata: null all through it, and that surprised me, because the metadata wasn't supposed to be in the pact, it was only supposed to be a thing between the Pact DSL and the mock service. So, I did a dig through the code and found that the metadata had been exposed on the wrong decorator. I fixed it in this commit: https://github.com/pact-foundation/pact-mock_service/commit/67ef5a6b774eb56d082cef137af3ef91ed193b53

thatguysimon commented 4 years ago

Got caught up in work related stuff lately.. didn't notice this :0 Thanks for the quick fix! I'll open a PR with a proper test for this asap.