@@ -177,7 +177,7 @@ def test_initialize
177
177
end
178
178
179
179
def test_initialize_name
180
- http = Net ::HTTP ::Persistent . new 'name'
180
+ http = Net ::HTTP ::Persistent . new name : 'name'
181
181
assert_equal 'name' , http . name
182
182
end
183
183
@@ -201,7 +201,7 @@ def test_initialize_no_ssl_session
201
201
def test_initialize_proxy
202
202
proxy_uri = URI . parse 'http://proxy.example'
203
203
204
- http = Net ::HTTP ::Persistent . new nil , proxy_uri
204
+ http = Net ::HTTP ::Persistent . new proxy : proxy_uri
205
205
206
206
assert_equal proxy_uri , http . proxy_uri
207
207
end
@@ -442,7 +442,7 @@ def test_connection_for_http_class_with_artifice
442
442
end
443
443
444
444
def test_connection_for_name
445
- http = Net ::HTTP ::Persistent . new 'name'
445
+ http = Net ::HTTP ::Persistent . new name : 'name'
446
446
uri = URI . parse 'http://example/'
447
447
448
448
http . connection_for uri do |c |
@@ -455,7 +455,7 @@ def test_connection_for_proxy
455
455
uri . user = 'johndoe'
456
456
uri . password = 'muffins'
457
457
458
- http = Net ::HTTP ::Persistent . new nil , uri
458
+ http = Net ::HTTP ::Persistent . new proxy : uri
459
459
460
460
used = http . connection_for @uri do |c |
461
461
assert c . http . started?
@@ -477,7 +477,7 @@ def test_connection_for_proxy_unescaped
477
477
uri . password = 'muf%3Afins'
478
478
uri . freeze
479
479
480
- http = Net ::HTTP ::Persistent . new nil , uri
480
+ http = Net ::HTTP ::Persistent . new proxy : uri
481
481
482
482
http . connection_for @uri do end
483
483
@@ -495,7 +495,7 @@ def test_connection_for_proxy_host_down
495
495
uri . user = 'johndoe'
496
496
uri . password = 'muffins'
497
497
498
- http = Net ::HTTP ::Persistent . new nil , uri
498
+ http = Net ::HTTP ::Persistent . new proxy : uri
499
499
500
500
e = assert_raises Net ::HTTP ::Persistent ::Error do
501
501
http . connection_for @uri do end
@@ -511,7 +511,7 @@ def test_connection_for_proxy_refused
511
511
uri . user = 'johndoe'
512
512
uri . password = 'muffins'
513
513
514
- http = Net ::HTTP ::Persistent . new nil , uri
514
+ http = Net ::HTTP ::Persistent . new proxy : uri
515
515
516
516
e = assert_raises Net ::HTTP ::Persistent ::Error do
517
517
http . connection_for @uri do end
@@ -526,7 +526,7 @@ def test_connection_for_no_proxy
526
526
uri . password = 'muffins'
527
527
uri . query = 'no_proxy=example.com'
528
528
529
- http = Net ::HTTP ::Persistent . new nil , uri
529
+ http = Net ::HTTP ::Persistent . new proxy : uri
530
530
531
531
http . connection_for @uri do |c |
532
532
assert c . http . started?
@@ -1360,7 +1360,7 @@ def test_shutdown
1360
1360
c = connection
1361
1361
1362
1362
orig = @http
1363
- @http = Net ::HTTP ::Persistent . new 'name'
1363
+ @http = Net ::HTTP ::Persistent . new name : 'name'
1364
1364
c2 = connection
1365
1365
1366
1366
orig . shutdown
0 commit comments