-
Couldn't load subscription status.
- Fork 10
feat([PoC]): Contract for sequence of messages. #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ def initialize message, decorator_options = {} | |
| end | ||
|
|
||
| def as_json options = {} | ||
| hash = { :description => message.description } | ||
| hash = { :description => message.descriptions.join(';') } | ||
| hash[:providerStates] = provider_states | ||
| hash[:contents] = extract_contents | ||
| hash[:matchingRules] = extract_matching_rules | ||
|
|
@@ -36,7 +36,9 @@ def decorate_contents | |
| end | ||
|
|
||
| def extract_contents | ||
| Pact::Reification.from_term(message.contents.contents) | ||
| message.events.map do |message_content| | ||
| Pact::Reification.from_term(message_content.contents) | ||
| end | ||
|
Comment on lines
+39
to
+41
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📓 It will return an array even for a single record, so when we have only one message content, we show an array |
||
| end | ||
|
|
||
| def provider_states | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝
matchingRulesis still only for a single message