diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb index 77bdab6..1df19e6 100644 --- a/test/uri/test_common.rb +++ b/test/uri/test_common.rb @@ -3,10 +3,7 @@ require 'envutil' require 'uri' -module URI - - -class TestCommon < Test::Unit::TestCase +class URI::TestCommon < Test::Unit::TestCase def setup end @@ -116,7 +113,7 @@ def test_parse_timeout pre = ->(n) { 'https://example.com/dir/' + 'a' * (n * 100) + '/##.jpg' } - assert_linear_performance((1..10).map {|i| i * 100}, rehearsal: 1000, pre: pre) do |uri| + assert_linear_performance((1..3).map {|i| 10**i}, rehearsal: 1000, pre: pre) do |uri| assert_raise(URI::InvalidURIError) do URI.parse(uri) end @@ -292,6 +289,3 @@ def test_decode_www_form private def s(str) str.force_encoding(Encoding::Windows_31J); end end - - -end diff --git a/test/uri/test_ftp.rb b/test/uri/test_ftp.rb index 0eec984..f45bb06 100644 --- a/test/uri/test_ftp.rb +++ b/test/uri/test_ftp.rb @@ -2,10 +2,7 @@ require 'test/unit' require 'uri/ftp' -module URI - - -class TestFTP < Test::Unit::TestCase +class URI::TestFTP < Test::Unit::TestCase def setup end @@ -29,7 +26,7 @@ def test_parse end def test_parse_invalid - assert_raise(InvalidURIError){URI.parse('ftp:example')} + assert_raise(URI::InvalidURIError) {URI.parse('ftp:example')} end def test_paths @@ -62,6 +59,3 @@ def test_select end end end - - -end diff --git a/test/uri/test_http.rb b/test/uri/test_http.rb index 748e90a..e937b1a 100644 --- a/test/uri/test_http.rb +++ b/test/uri/test_http.rb @@ -3,10 +3,7 @@ require 'uri/http' require 'uri/https' -module URI - - -class TestHTTP < Test::Unit::TestCase +class URI::TestHTTP < Test::Unit::TestCase def setup end @@ -82,6 +79,3 @@ def test_origin assert_equal('https://a.b.c', URI.parse('https://a.b.c/').origin) end end - - -end diff --git a/test/uri/test_ldap.rb b/test/uri/test_ldap.rb index 2625b24..9c4506a 100644 --- a/test/uri/test_ldap.rb +++ b/test/uri/test_ldap.rb @@ -2,10 +2,7 @@ require 'test/unit' require 'uri/ldap' -module URI - - -class TestLDAP < Test::Unit::TestCase +class URI::TestLDAP < Test::Unit::TestCase def setup end @@ -100,6 +97,3 @@ def test_parse_invalid_uri assert_raise(URI::InvalidURIError) {URI.parse("ldap:https://example.com")} end end - - -end diff --git a/test/uri/test_ws.rb b/test/uri/test_ws.rb index 17acb0d..f3918f6 100644 --- a/test/uri/test_ws.rb +++ b/test/uri/test_ws.rb @@ -3,10 +3,7 @@ require 'uri/http' require 'uri/ws' -module URI - - -class TestWS < Test::Unit::TestCase +class URI::TestWS < Test::Unit::TestCase def setup end @@ -66,6 +63,3 @@ def test_select end end end - - -end diff --git a/test/uri/test_wss.rb b/test/uri/test_wss.rb index 2e8b9bc..13a2583 100644 --- a/test/uri/test_wss.rb +++ b/test/uri/test_wss.rb @@ -3,10 +3,7 @@ require 'uri/https' require 'uri/wss' -module URI - - -class TestWSS < Test::Unit::TestCase +class URI::TestWSS < Test::Unit::TestCase def setup end @@ -66,6 +63,3 @@ def test_select end end end - - -end