summaryrefslogtreecommitdiff
path: root/test/net/imap
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-15 06:01:00 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-15 06:01:00 +0000
commit6bab4ea9917dc05cd2c94aead2e96eb7df7d4be1 (patch)
tree1900f937852fe05173883f1a8cd32d0d49b5f747 /test/net/imap
parent64beb15dbc16ad251a55545bb89775bf23a6a845 (diff)
* lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_nothing_raised):
should properly ignore MiniTest::Skip * lib/minitest/unit.rb (MiniTest::Assertions::assert_raises): ditto. * test/net/imap/test_imap.rb: Properly skip SSL tests when localhost is not 127.0.0.1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 06ecca0f004..8ccec642c09 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