summaryrefslogtreecommitdiff
path: root/test/net/imap
diff options
context:
space:
mode:
Diffstat (limited to 'test/net/imap')
-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