forked from pact-foundation/pact-support
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: parse String response and request bodies to StringWithMatchingR…
…ules to support pact-xml
- Loading branch information
Showing
3 changed files
with
102 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module Pact | ||
class StringWithMatchingRules < String | ||
attr_reader :matching_rules | ||
attr_reader :pact_specification_version | ||
|
||
def initialize string, pact_specification_version, matching_rules = {} | ||
super(string) | ||
@matching_rules = matching_rules | ||
@pact_specification_version = pact_specification_version | ||
end | ||
|
||
# How can we show the matching rules too? | ||
def to_s | ||
super | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters