mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_mailto.rb: adjust scope
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7f4dc81717
commit
a37cc2d4d8
1 changed files with 4 additions and 10 deletions
|
@ -2,10 +2,7 @@
|
|||
require 'test/unit'
|
||||
require 'uri/mailto'
|
||||
|
||||
module URI
|
||||
|
||||
|
||||
class TestMailTo < Test::Unit::TestCase
|
||||
class URI::TestMailTo < Test::Unit::TestCase
|
||||
def setup
|
||||
@u = URI::MailTo
|
||||
end
|
||||
|
@ -135,7 +132,7 @@ class TestMailTo < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_initializer
|
||||
assert_raise(InvalidComponentError) do
|
||||
assert_raise(URI::InvalidComponentError) do
|
||||
URI::MailTo.new('mailto', 'sdmitry:bla', 'localhost', '2000', nil,
|
||||
'joe@example.com', nil, nil, 'subject=Ruby')
|
||||
end
|
||||
|
@ -144,11 +141,11 @@ class TestMailTo < Test::Unit::TestCase
|
|||
def test_check_to
|
||||
u = URI::MailTo.build(['joe@example.com', 'subject=Ruby'])
|
||||
|
||||
assert_raise(InvalidComponentError) do
|
||||
assert_raise(URI::InvalidComponentError) do
|
||||
u.to = '#1@mail.com'
|
||||
end
|
||||
|
||||
assert_raise(InvalidComponentError) do
|
||||
assert_raise(URI::InvalidComponentError) do
|
||||
u.to = '@invalid.email'
|
||||
end
|
||||
end
|
||||
|
@ -194,6 +191,3 @@ class TestMailTo < Test::Unit::TestCase
|
|||
u.to_mailtext
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue