summaryrefslogtreecommitdiff
path: root/test/uri
diff options
context:
space:
mode:
Diffstat (limited to 'test/uri')
-rw-r--r--test/uri/test_ftp.rb2
-rw-r--r--test/uri/test_generic.rb24
-rw-r--r--test/uri/test_http.rb2
-rw-r--r--test/uri/test_ldap.rb2
-rw-r--r--test/uri/test_mailto.rb4
5 files changed, 17 insertions, 17 deletions
diff --git a/test/uri/test_ftp.rb b/test/uri/test_ftp.rb
index c27cf6165bf..6311be81b7c 100644
--- a/test/uri/test_ftp.rb
+++ b/test/uri/test_ftp.rb
@@ -52,7 +52,7 @@ class TestFTP < Test::Unit::TestCase
u = URI.parse('ftp://a.b.c/')
ary = u.component.collect {|c| u.send(c)}
assert_equal(ary, u.select(*u.component))
- assert_raises(ArgumentError) do
+ assert_raise(ArgumentError) do
u.select(:scheme, :host, :not_exist, :port)
end
end
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
index e8024c8bf20..0d481c369af 100644
--- a/test/uri/test_generic.rb
+++ b/test/uri/test_generic.rb
@@ -121,8 +121,8 @@ class URI::TestGeneric < Test::Unit::TestCase
# 7
# reported by Mr. Kubota <em6t-kbt@asahi-net.or.jp>
- assert_raises(URI::InvalidURIError) { URI.parse('http://a_b:80/') }
- assert_raises(URI::InvalidURIError) { URI.parse('http://a_b/') }
+ assert_raise(URI::InvalidURIError) { URI.parse('http://a_b:80/') }
+ assert_raise(URI::InvalidURIError) { URI.parse('http://a_b/') }
# 8
# reported by m_seki
@@ -680,19 +680,19 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_equal('http://foo:bar@zab:8080/?a=1#b123', uri.to_s)
uri = URI.parse('http://example.com')
- assert_raises(URI::InvalidURIError) { uri.password = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.password = 'bar' }
uri.userinfo = 'foo:bar'
assert_equal('http://foo:bar@example.com', uri.to_s)
- assert_raises(URI::InvalidURIError) { uri.registry = 'bar' }
- assert_raises(URI::InvalidURIError) { uri.opaque = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.registry = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.opaque = 'bar' }
uri = URI.parse('mailto:foo@example.com')
- assert_raises(URI::InvalidURIError) { uri.user = 'bar' }
- assert_raises(URI::InvalidURIError) { uri.password = 'bar' }
- assert_raises(URI::InvalidURIError) { uri.userinfo = ['bar', 'baz'] }
- assert_raises(URI::InvalidURIError) { uri.host = 'bar' }
- assert_raises(URI::InvalidURIError) { uri.port = 'bar' }
- assert_raises(URI::InvalidURIError) { uri.path = 'bar' }
- assert_raises(URI::InvalidURIError) { uri.query = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.user = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.password = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.userinfo = ['bar', 'baz'] }
+ assert_raise(URI::InvalidURIError) { uri.host = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.port = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.path = 'bar' }
+ assert_raise(URI::InvalidURIError) { uri.query = 'bar' }
end
end
diff --git a/test/uri/test_http.rb b/test/uri/test_http.rb
index a6846141dfd..6c8e700b776 100644
--- a/test/uri/test_http.rb
+++ b/test/uri/test_http.rb
@@ -53,7 +53,7 @@ class TestHTTP < Test::Unit::TestCase
assert_equal(['http', 'a.b.c', 80], URI.parse('http://a.b.c/').select(:scheme, :host, :port))
u = URI.parse('http://a.b.c/')
assert_equal(uri_to_ary(u), u.select(*u.component))
- assert_raises(ArgumentError) do
+ assert_raise(ArgumentError) do
u.select(:scheme, :host, :not_exist, :port)
end
end
diff --git a/test/uri/test_ldap.rb b/test/uri/test_ldap.rb
index 866b7d80667..0eaa113c946 100644
--- a/test/uri/test_ldap.rb
+++ b/test/uri/test_ldap.rb
@@ -90,7 +90,7 @@ class TestLDAP < Test::Unit::TestCase
def test_select
u = URI.parse('ldap:///??sub??!bindname=cn=Manager%2co=Foo')
assert_equal(uri_to_ary(u), u.select(*u.component))
- assert_raises(ArgumentError) do
+ assert_raise(ArgumentError) do
u.select(:scheme, :host, :not_exist, :port)
end
end
diff --git a/test/uri/test_mailto.rb b/test/uri/test_mailto.rb
index ba437904f81..38715fcc9c3 100644
--- a/test/uri/test_mailto.rb
+++ b/test/uri/test_mailto.rb
@@ -101,7 +101,7 @@ class TestMailTo < Test::Unit::TestCase
end
bad.each do |x|
- assert_raises(URI::InvalidComponentError) {
+ assert_raise(URI::InvalidComponentError) {
@u.build(x)
}
end
@@ -112,7 +112,7 @@ class TestMailTo < Test::Unit::TestCase
def test_select
u = URI.parse('mailto:joe@example.com?cc=bob@example.com&body=hello')
assert_equal(uri_to_ary(u), u.select(*u.component))
- assert_raises(ArgumentError) do
+ assert_raise(ArgumentError) do
u.select(:scheme, :host, :not_exist, :port)
end
end