spec/support/pact_helper.rb in pact-1.3.0 vs spec/support/pact_helper.rb in pact-1.3.1
- old
+ new
@@ -9,9 +9,11 @@
def call env
if env['PATH_INFO'] == '/weather'
[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']]
+ elsif env['PATH_INFO'] == '/content_type_is_important'
+ [200, {'Content-Type' => 'application/json'}, [{message: "A message", note: "This will cause verify to fail if it using the wrong content type differ."}.to_json]]
else
raise "unexpected path #{env['PATH_INFO']}!!!"
end
end
end