Skip to content

Commit babc319

Browse files
committedJul 14, 2018
feat: add custom contract parsers to front of pact parsers list so that customised parsers are tried first
1 parent 6081373 commit babc319

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/pact/consumer_contract/consumer_contract.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
require 'pact/consumer_contract/http_consumer_contract_parser'
1414

1515
module Pact
16+
1617
class ConsumerContract
1718

1819
include SymbolizeKeys
@@ -30,7 +31,7 @@ def initialize(attributes = {})
3031
end
3132

3233
def self.add_parser consumer_contract_parser
33-
parsers << consumer_contract_parser
34+
parsers.unshift(consumer_contract_parser)
3435
end
3536

3637
def self.parsers

0 commit comments

Comments
 (0)