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

ruby-changes:13640

From: nobu <ko1@a...>
Date: Wed, 21 Oct 2009 08:17:44 +0900 (JST)
Subject: [ruby-changes:13640] Ruby:r25424 (trunk): * test/logger/test_logger.rb (TestLogDevice#test_write): check

nobu	2009-10-21 08:17:19 +0900 (Wed, 21 Oct 2009)

  New Revision: 25424

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

  Log:
    * test/logger/test_logger.rb (TestLogDevice#test_write): check
      also error message.

  Modified files:
    trunk/ChangeLog
    trunk/test/logger/test_logger.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25423)
+++ ChangeLog	(revision 25424)
@@ -1,3 +1,8 @@
+Wed Oct 21 08:17:17 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* test/logger/test_logger.rb (TestLogDevice#test_write): check
+	  also error message.
+
 Wed Oct 21 03:54:41 2009  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* lib/matrix.rb:  
Index: test/logger/test_logger.rb
===================================================================
--- test/logger/test_logger.rb	(revision 25423)
+++ test/logger/test_logger.rb	(revision 25424)
@@ -328,13 +328,19 @@
     assert_equal("msg2\n\n", msg)
     #
     logdev = d(LogExcnRaiser.new)
+    class << (stderr = '')
+      alias write <<
+    end
+    $stderr, stderr = stderr, $stderr
     begin
       assert_nothing_raised do
         logdev.write('hello')
       end
     ensure
       logdev.close
+      $stderr, stderr = stderr, $stderr
     end
+    assert_equal "log writing failed. disk is full\n", stderr
   end
 
   def test_close

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

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