[前][次][番号順一覧][スレッド一覧]

ruby-changes:17343

From: shyouhei <ko1@a...>
Date: Mon, 27 Sep 2010 15:29:27 +0900 (JST)
Subject: [ruby-changes:17343] Ruby:r29348 (trunk): * test/net/imap/test_imap.rb: resurrection of r29259.

shyouhei	2010-09-27 15:28:59 +0900 (Mon, 27 Sep 2010)

  New Revision: 29348

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29348

  Log:
    * test/net/imap/test_imap.rb: resurrection of r29259.
      this change depends on minitest 1.7.1.
    
    * lib/test/unit/assertions.rb: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/test/unit/assertions.rb
    trunk/test/net/imap/test_imap.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29347)
+++ ChangeLog	(revision 29348)
@@ -1,3 +1,10 @@
+Mon Sep 27 15:25:05 2010  URABE Shyouhei  <shyouhei@r...>
+
+	* test/net/imap/test_imap.rb: resurrection of r29259.
+	  this change depends on minitest 1.7.1.
+
+	* lib/test/unit/assertions.rb: ditto.
+
 Sun Sep 26 22:59:45 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* tool/config.sub (x86_64-pc-mingw64): regularize.
Index: lib/test/unit/assertions.rb
===================================================================
--- lib/test/unit/assertions.rb	(revision 29347)
+++ lib/test/unit/assertions.rb	(revision 29348)
@@ -32,6 +32,8 @@
         end
         begin
           line = __LINE__; yield
+        rescue MiniTest::Skip
+          raise
         rescue Exception => e
           bt = e.backtrace
           as = e.instance_of?(MiniTest::Assertion)
Index: test/net/imap/test_imap.rb
===================================================================
--- test/net/imap/test_imap.rb	(revision 29347)
+++ test/net/imap/test_imap.rb	(revision 29348)
@@ -49,9 +49,13 @@
     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 @@
     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 @@
         imap
       end
     end
+  rescue SystemCallError
+    skip $!
   ensure
     if imap && !imap.disconnected?
       imap.disconnect

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]