[前][次][番号順一覧][スレッド一覧]

ruby-changes:45026

From: nobu <ko1@a...>
Date: Sat, 17 Dec 2016 09:58:50 +0900 (JST)
Subject: [ruby-changes:45026] nobu:r57099 (trunk): test_mailto.rb: adjust scope

nobu	2016-12-17 09:58:46 +0900 (Sat, 17 Dec 2016)

  New Revision: 57099

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57099

  Log:
    test_mailto.rb: adjust scope

  Modified files:
    trunk/test/uri/test_mailto.rb
Index: test/uri/test_mailto.rb
===================================================================
--- test/uri/test_mailto.rb	(revision 57098)
+++ test/uri/test_mailto.rb	(revision 57099)
@@ -2,10 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/test/uri/test_mailto.rb#L2
 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 https://github.com/ruby/ruby/blob/trunk/test/uri/test_mailto.rb#L132
   end
 
   def test_initializer
-    assert_raise(InvalidComponentError) do
+    assert_raise(URI::InvalidComponentError) do
       URI::MailTo.new('mailto', 'sdmitry:bla', 'localhost', '2000', nil,
                       'joe@e...', nil, nil, 'subject=Ruby')
     end
@@ -144,11 +141,11 @@ class TestMailTo < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/uri/test_mailto.rb#L141
   def test_check_to
     u = URI::MailTo.build(['joe@e...', 'subject=Ruby'])
 
-    assert_raise(InvalidComponentError) do
+    assert_raise(URI::InvalidComponentError) do
       u.to = '#1@m...'
     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 https://github.com/ruby/ruby/blob/trunk/test/uri/test_mailto.rb#L191
       u.to_mailtext
   end
 end
-
-
-end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]