summaryrefslogtreecommitdiff
path: root/test/net
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
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')
-rw-r--r--test/net/http/test_http.rb2
-rw-r--r--test/net/http/test_httpresponse.rb2
-rw-r--r--test/net/smtp/test_smtp.rb6
-rw-r--r--test/net/smtp/test_ssl_socket.rb6
4 files changed, 8 insertions, 8 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index b72aadd54c..1bd085a90b 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -899,7 +899,7 @@ class TestNetHTTPKeepAlive < Test::Unit::TestCase
end
start {|http|
- assert_raises(EOFError, Errno::ECONNRESET, IOError) {
+ assert_raise(EOFError, Errno::ECONNRESET, IOError) {
http.get('/')
}
}
diff --git a/test/net/http/test_httpresponse.rb b/test/net/http/test_httpresponse.rb
index 0193a153e4..ba8b45eaca 100644
--- a/test/net/http/test_httpresponse.rb
+++ b/test/net/http/test_httpresponse.rb
@@ -253,7 +253,7 @@ Connection: close
hello
EOS
- assert_raises Net::HTTPBadResponse do
+ assert_raise Net::HTTPBadResponse do
Net::HTTPResponse.read_new(io)
end
end
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