@@ -255,7 +255,7 @@ def parse_query(str)
255255 req = capture_request ( client ) { client . get ( "http://example.com/" , json : { foo : :bar } ) }
256256
257257 assert_equal '{"foo":"bar"}' , req . body . source
258- assert_equal "application/json; charset=utf-8" , req [ "Content-Type" ]
258+ assert_equal "application/json; charset=utf-8" , req . headers [ "Content-Type" ]
259259 end
260260 end
261261
@@ -279,7 +279,7 @@ def parse_query(str)
279279 it "keeps Host header as is" do
280280 req = capture_request ( client ) { client . request ( :get , "http://example.com/" ) }
281281
282- assert_equal "another.example.com" , req [ "Host" ]
282+ assert_equal "another.example.com" , req . headers [ "Host" ]
283283 end
284284 end
285285
@@ -290,13 +290,13 @@ def parse_query(str)
290290 it "deletes Content-Length header" do
291291 req = capture_request ( client ) { client . request ( :get , "http://example.com/" ) }
292292
293- assert_nil req [ "Content-Length" ]
293+ assert_nil req . headers [ "Content-Length" ]
294294 end
295295
296296 it "sets Content-Encoding header" do
297297 req = capture_request ( client ) { client . request ( :get , "http://example.com/" ) }
298298
299- assert_equal "gzip" , req [ "Content-Encoding" ]
299+ assert_equal "gzip" , req . headers [ "Content-Encoding" ]
300300 end
301301
302302 context "and there is no body" do
0 commit comments