Skip to content

Commit

Permalink
Define test cases as qualified class names
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed May 4, 2023
1 parent cfbeade commit aaa22a2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 43 deletions.
8 changes: 1 addition & 7 deletions test/uri/test_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
require 'envutil'
require 'uri'

module URI


class TestCommon < Test::Unit::TestCase
class URI::TestCommon < Test::Unit::TestCase
def setup
end

Expand Down Expand Up @@ -292,6 +289,3 @@ def test_decode_www_form
private
def s(str) str.force_encoding(Encoding::Windows_31J); end
end


end
10 changes: 2 additions & 8 deletions test/uri/test_ftp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -62,6 +59,3 @@ def test_select
end
end
end


end
8 changes: 1 addition & 7 deletions test/uri/test_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -82,6 +79,3 @@ def test_origin
assert_equal('https://a.b.c', URI.parse('https://a.b.c/').origin)
end
end


end
8 changes: 1 addition & 7 deletions test/uri/test_ldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -100,6 +97,3 @@ def test_parse_invalid_uri
assert_raise(URI::InvalidURIError) {URI.parse("ldap:https://example.com")}
end
end


end
8 changes: 1 addition & 7 deletions test/uri/test_ws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -66,6 +63,3 @@ def test_select
end
end
end


end
8 changes: 1 addition & 7 deletions test/uri/test_wss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -66,6 +63,3 @@ def test_select
end
end
end


end

0 comments on commit aaa22a2

Please sign in to comment.