mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
64beb15dbc
commit
6bab4ea991
4 changed files with 31 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue