test/spec_rack_webrick.rb in rack-1.0.1 vs test/spec_rack_webrick.rb in rack-1.1.0

- old
+ new

@@ -7,11 +7,11 @@ Thread.abort_on_exception = true context "Rack::Handler::WEBrick" do include TestRequest::Helpers - + setup do @server = WEBrick::HTTPServer.new(:Host => @host='0.0.0.0', :Port => @port=9202, :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN), :AccessLog => []) @@ -37,31 +37,31 @@ response["SERVER_NAME"].should.equal "0.0.0.0" end specify "should have rack headers" do GET("/test") - response["rack.version"].should.equal [1,0] + response["rack.version"].should.equal [1,1] response["rack.multithread"].should.be true response["rack.multiprocess"].should.be false response["rack.run_once"].should.be false end specify "should have CGI headers on GET" do GET("/test") response["REQUEST_METHOD"].should.equal "GET" response["SCRIPT_NAME"].should.equal "/test" response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.be.nil + response["PATH_INFO"].should.be.equal "" response["QUERY_STRING"].should.equal "" response["test.postdata"].should.equal "" GET("/test/foo?quux=1") response["REQUEST_METHOD"].should.equal "GET" response["SCRIPT_NAME"].should.equal "/test" response["REQUEST_PATH"].should.equal "/" response["PATH_INFO"].should.equal "/foo" response["QUERY_STRING"].should.equal "quux=1" - + GET("/test/foo%25encoding?quux=1") response["REQUEST_METHOD"].should.equal "GET" response["SCRIPT_NAME"].should.equal "/test" response["REQUEST_PATH"].should.equal "/" response["PATH_INFO"].should.equal "/foo%25encoding"