summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/uri/test_common.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb
index 1e1a40d115..a159901ea6 100644
--- a/test/uri/test_common.rb
+++ b/test/uri/test_common.rb
@@ -43,6 +43,13 @@ class TestCommon < Test::Unit::TestCase
assert_equal nil, ':'.slice(URI.regexp)
assert_equal 'From:', 'From:'.slice(URI.regexp)
end
+
+ def test_kernel_uri
+ expected = URI.parse("http://www.ruby-lang.org/")
+ assert_equal(expected, URI("http://www.ruby-lang.org/"))
+ assert_equal(expected, Kernel::URI("http://www.ruby-lang.org/"))
+ assert_raise(NoMethodError) { Object.new.URI("http://www.ruby-lang.org/") }
+ end
end