summaryrefslogtreecommitdiff
path: root/test/spec_response.rb
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-02-04 10:58:05 +1300
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-02-05 13:35:25 +1300
commitd2e608e8d54b76ec7e52bb7c6508c5a5259c934e (patch)
treef956a408abd3101f2a46f6e72de9fd501e1198a8 /test/spec_response.rb
parent65992dfca8bf8a2f108d12f3a4c932f23f9c6646 (diff)
downloadrack-d2e608e8d54b76ec7e52bb7c6508c5a5259c934e.tar.gz
Memoize header hash usage. Fixes #738.
Diffstat (limited to 'test/spec_response.rb')
-rw-r--r--test/spec_response.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/spec_response.rb b/test/spec_response.rb
index c27112fb..b2ba59a8 100644
--- a/test/spec_response.rb
+++ b/test/spec_response.rb
@@ -71,13 +71,13 @@ describe Rack::Response do
end
it "doesn't mutate given headers" do
- [{}, Rack::Utils::HeaderHash.new].each do |header|
- response = Rack::Response.new([], 200, header)
- response.header["Content-Type"] = "text/plain"
- response.header["Content-Type"].must_equal "text/plain"
+ headers = {}
- header.wont_include("Content-Type")
- end
+ response = Rack::Response.new([], 200, headers)
+ response.headers["Content-Type"] = "text/plain"
+ response.headers["Content-Type"].must_equal "text/plain"
+
+ headers.wont_include("Content-Type")
end
it "can override the initial Content-Type with a different case" do