test/spec_content_length.rb in rack-2.0.1 vs test/spec_content_length.rb in rack-2.0.2

- old
+ new

@@ -34,26 +34,26 @@ end it "not set Content-Length on 304 responses" do app = lambda { |env| [304, {}, []] } response = content_length(app).call(request) - response[1]['Content-Length'].must_equal nil + response[1]['Content-Length'].must_be_nil end it "not set Content-Length when Transfer-Encoding is chunked" do app = lambda { |env| [200, {'Content-Type' => 'text/plain', 'Transfer-Encoding' => 'chunked'}, []] } response = content_length(app).call(request) - response[1]['Content-Length'].must_equal nil + response[1]['Content-Length'].must_be_nil end # Using "Connection: close" for this is fairly contended. It might be useful # to have some other way to signal this. # # should "not force a Content-Length when Connection:close" do # app = lambda { |env| [200, {'Connection' => 'close'}, []] } # response = content_length(app).call({}) - # response[1]['Content-Length'].must_equal nil + # response[1]['Content-Length'].must_be_nil # end it "close bodies that need to be closed" do body = Struct.new(:body) do attr_reader :closed @@ -62,10 +62,10 @@ def to_ary; end end.new(%w[one two three]) app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, body] } response = content_length(app).call(request) - body.closed.must_equal nil + body.closed.must_be_nil response[2].close body.closed.must_equal true end it "support single-execute bodies" do