diff --git a/lib/pact/provider/test_methods.rb b/lib/pact/provider/test_methods.rb index 92ddc004..243894aa 100644 --- a/lib/pact/provider/test_methods.rb +++ b/lib/pact/provider/test_methods.rb @@ -29,7 +29,9 @@ def replay_interaction interaction, request_customizer = nil def parse_body_from_response rack_response case rack_response.headers['Content-Type'] when /json/ - JSON.load(rack_response.body) + # For https://github.com/pact-foundation/pact-net/issues/237 + # Only required for the pact-ruby-standalone ¯\_(ツ)_/¯ + JSON.load("[#{rack_response.body}]").first else rack_response.body end