summaryrefslogtreecommitdiff
path: root/test/net/smtp
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 02:18:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-02 02:18:44 +0000
commitae042f21fb695fc80eb19273fa542e8dad85f19f (patch)
tree6b64fce04b19a8e1531f60a7d3d47c8a9fc97a20 /test/net/smtp
parent21f2c194bbf781d9228584f3e93f4a93b33f5632 (diff)
use assert_raise
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net/smtp')
-rw-r--r--test/net/smtp/test_smtp.rb6
-rw-r--r--test/net/smtp/test_ssl_socket.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/test/net/smtp/test_smtp.rb b/test/net/smtp/test_smtp.rb
index 748b20d65b..d8bb0c192c 100644
--- a/test/net/smtp/test_smtp.rb
+++ b/test/net/smtp/test_smtp.rb
@@ -1,9 +1,9 @@
require 'net/smtp'
require 'stringio'
-require 'minitest/autorun'
+require 'test/unit'
module Net
- class TestSMTP < MiniTest::Unit::TestCase
+ class TestSMTP < Test::Unit::TestCase
class FakeSocket
def initialize out = "250 OK\n"
@write_io = StringIO.new
@@ -24,7 +24,7 @@ module Net
def test_critical
smtp = Net::SMTP.new 'localhost', 25
- assert_raises RuntimeError do
+ assert_raise RuntimeError do
smtp.send :critical do
raise 'fail on purpose'
end
diff --git a/test/net/smtp/test_ssl_socket.rb b/test/net/smtp/test_ssl_socket.rb
index dc8b03e07a..ff229b5ad0 100644
--- a/test/net/smtp/test_ssl_socket.rb
+++ b/test/net/smtp/test_ssl_socket.rb
@@ -1,8 +1,8 @@
require 'net/smtp'
-require 'minitest/autorun'
+require 'test/unit'
module Net
- class TestSSLSocket < MiniTest::Unit::TestCase
+ class TestSSLSocket < Test::Unit::TestCase
class MySMTP < SMTP
attr_accessor :fake_tcp, :fake_ssl
@@ -52,7 +52,7 @@ module Net
connection.fake_tcp = tcp_socket
connection.fake_ssl = ssl_socket
- assert_raises(OpenSSL::SSL::SSLError) do
+ assert_raise(OpenSSL::SSL::SSLError) do
connection.start
end
assert_equal true, ssl_socket.closed