test/test_responder.rb in cognition-2.0.4 vs test/test_responder.rb in cognition-2.0.5

- old
+ new

@@ -1,20 +1,20 @@ -require 'minitest/autorun' -require 'cognition' -require 'test_helper' +require "minitest/autorun" +require "cognition" +require "test_helper" class ResponderTest < Minitest::Test def test_sends_reply - stub_request(:any, "http://foo.bar/path"). - to_return(status: 200) - responder = Cognition::Responder.new('http://foo.bar/path') + stub_request(:any, "http://foo.bar/path") + .to_return(status: 200) + responder = Cognition::Responder.new("http://foo.bar/path") - assert_equal 200, responder.reply('foobar').code + assert_equal 200, responder.reply("foobar").code end def test_handles_timeouts stub_request(:any, "http://foo.bar/path").to_timeout - responder = Cognition::Responder.new('http://foo.bar/path') + responder = Cognition::Responder.new("http://foo.bar/path") - assert_equal 'Request to http://foo.bar/path timed out.', responder.reply('foobar') + assert_equal "Request to http://foo.bar/path timed out.", responder.reply("foobar") end end