diff options
author | tompng <[email protected]> | 2024-06-14 21:57:41 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2024-10-03 18:47:09 +0900 |
commit | c94815bab720e88c76b46709a1c0b992cae5353c (patch) | |
tree | ea4470e29562f0de18f6cc75de4d585c99db3ca9 /spec/ruby/library/net-http/http | |
parent | af1c356c7b318ccdb8abbcf35bd1fff2082bf91b (diff) |
Update spec/ruby/ for colon-style hash inspect
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/10924
Diffstat (limited to 'spec/ruby/library/net-http/http')
-rw-r--r-- | spec/ruby/library/net-http/http/post_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/net-http/http/send_request_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/library/net-http/http/post_spec.rb b/spec/ruby/library/net-http/http/post_spec.rb index d7d94fec4a..ac020bd6be 100644 --- a/spec/ruby/library/net-http/http/post_spec.rb +++ b/spec/ruby/library/net-http/http/post_spec.rb @@ -27,7 +27,7 @@ describe "Net::HTTP.post" do it "sends Content-Type: application/x-www-form-urlencoded by default" do response = Net::HTTP.post(URI("http://localhost:#{NetHTTPSpecs.port}/request/header"), "test=test") - response.body.should include('"Content-Type"=>"application/x-www-form-urlencoded"') + response.body.should include({ "Content-Type" => "application/x-www-form-urlencoded" }.inspect.delete("{}")) end it "does not support HTTP Basic Auth" do diff --git a/spec/ruby/library/net-http/http/send_request_spec.rb b/spec/ruby/library/net-http/http/send_request_spec.rb index e82b2a96a1..af35c068ce 100644 --- a/spec/ruby/library/net-http/http/send_request_spec.rb +++ b/spec/ruby/library/net-http/http/send_request_spec.rb @@ -54,7 +54,7 @@ describe "Net::HTTP#send_request" do @methods.each do |method| response = @http.send_request(method, "/request/header", "test=test", "referer" => referer) - response.body.should include('"Referer"=>"' + referer + '"') + response.body.should include({ "Referer" => referer }.inspect.delete("{}")) end end end |