test/spec_webrick.rb in rack-1.3.10 vs test/spec_webrick.rb in rack-1.4.0

- old
+ new

@@ -4,11 +4,11 @@ Thread.abort_on_exception = true describe Rack::Handler::WEBrick do extend TestRequest::Helpers - @server = WEBrick::HTTPServer.new(:Host => @host='0.0.0.0', + @server = WEBrick::HTTPServer.new(:Host => @host='127.0.0.1', :Port => @port=9202, :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN), :AccessLog => []) @server.mount "/test", Rack::Handler::WEBrick, Rack::Lint.new(TestRequest.new) @@ -26,11 +26,11 @@ status.should.equal 200 response["SERVER_SOFTWARE"].should =~ /WEBrick/ response["HTTP_VERSION"].should.equal "HTTP/1.1" response["SERVER_PROTOCOL"].should.equal "HTTP/1.1" response["SERVER_PORT"].should.equal "9202" - response["SERVER_NAME"].should.equal "0.0.0.0" + response["SERVER_NAME"].should.equal "127.0.0.1" end should "have rack headers" do GET("/test") response["rack.version"].should.equal [1,1] @@ -104,10 +104,12 @@ should "provide a .run" do block_ran = false catch(:done) { Rack::Handler::WEBrick.run(lambda {}, - {:Port => 9210, + { + :Host => '127.0.0.1', + :Port => 9210, :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN), :AccessLog => []}) { |server| block_ran = true server.should.be.kind_of WEBrick::HTTPServer @s = server