summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-27 06:28:59 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-27 06:28:59 +0000
commit36cfaa805294b1f2d00f3eeadf03c179a387d568 (patch)
tree3d3bb3c9e18568e58a3b7824905357db33f6edec /test/net
parentae9264678cfde7bcc27d20d70c7643d2704a8dbd (diff)
* test/net/imap/test_imap.rb: resurrection of r29259.
this change depends on minitest 1.7.1. * lib/test/unit/assertions.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net')
-rw-r--r--test/net/imap/test_imap.rb22
1 files changed, 16 insertions, 6 deletions
diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb
index 06ecca0f00..8ccec642c0 100644
--- a/test/net/imap/test_imap.rb
+++ b/test/net/imap/test_imap.rb
@@ -49,9 +49,13 @@ class IMAPTest < Test::Unit::TestCase
if defined?(OpenSSL)
assert_raise(OpenSSL::SSL::SSLError) do
imaps_test do |port|
- Net::IMAP.new("localhost",
- :port => port,
- :ssl => true)
+ begin
+ Net::IMAP.new("localhost",
+ :port => port,
+ :ssl => true)
+ rescue SystemCallError
+ skip $!
+ end
end
end
end
@@ -61,9 +65,13 @@ class IMAPTest < Test::Unit::TestCase
if defined?(OpenSSL)
assert_nothing_raised do
imaps_test do |port|
- Net::IMAP.new("localhost",
- :port => port,
- :ssl => { :ca_file => CA_FILE })
+ begin
+ Net::IMAP.new("localhost",
+ :port => port,
+ :ssl => { :ca_file => CA_FILE })
+ rescue SystemCallError
+ skip $!
+ end
end
end
end
@@ -104,6 +112,8 @@ class IMAPTest < Test::Unit::TestCase
imap
end
end
+ rescue SystemCallError
+ skip $!
ensure
if imap && !imap.disconnected?
imap.disconnect