spec/support/pact_helper.rb in pact-1.1.0.rc2 vs spec/support/pact_helper.rb in pact-1.1.0.rc3
- old
+ new
@@ -5,20 +5,21 @@
module Pact
module Test
class TestApp
def call env
if env['PATH_INFO'] == '/weather'
- [200, {'Content-Type' => 'application/json'}, [{message: WEATHER[:current_state]}.to_json]]
+ [200, {'Content-Type' => 'application/json'}, [{message: WEATHER[:current_state], :array => [{"foo"=> "blah"}]}.to_json]]
elsif env['PATH_INFO'] == '/sometext'
[200, {'Content-Type' => 'text/plain'}, ['some text']]
else
raise "unexpected path #{env['PATH_INFO']}!!!"
end
end
end
Pact.configure do | config |
config.logger.level = Logger::DEBUG
+ config.diff_formatter = :unix
end
Pact.service_provider "Some Provider" do
app { TestApp.new }