Skip to content

Commit

Permalink
feat: add custom contract parsers to front of pact parsers list so th…
Browse files Browse the repository at this point in the history
…at customised parsers are tried first
  • Loading branch information
bethesque committed Jul 14, 2018
1 parent 6081373 commit babc319
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pact/consumer_contract/consumer_contract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
require 'pact/consumer_contract/http_consumer_contract_parser'

module Pact

class ConsumerContract

include SymbolizeKeys
Expand All @@ -30,7 +31,7 @@ def initialize(attributes = {})
end

def self.add_parser consumer_contract_parser
parsers << consumer_contract_parser
parsers.unshift(consumer_contract_parser)
end

def self.parsers
Expand Down

0 comments on commit babc319

Please sign in to comment.