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

ruby-changes:9561

From: nobu <ko1@a...>
Date: Sat, 27 Dec 2008 22:41:23 +0900 (JST)
Subject: [ruby-changes:9561] Ruby:r21101 (trunk): * test/rdoc/test_rdoc_info_formatting.rb (setup, teadown): uses

nobu	2008-12-27 22:41:04 +0900 (Sat, 27 Dec 2008)

  New Revision: 21101

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

  Log:
    * test/rdoc/test_rdoc_info_formatting.rb (setup, teadown): uses
      mktmpdir and removes it alfter the test.
    * test/cgi/test_cgi_session.rb (setup, teadown): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/test/cgi/test_cgi_session.rb
    trunk/test/rdoc/test_rdoc_info_formatting.rb
    trunk/test/test_pty.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21100)
+++ ChangeLog	(revision 21101)
@@ -1,3 +1,10 @@
+Sat Dec 27 22:41:02 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* test/rdoc/test_rdoc_info_formatting.rb (setup, teadown): uses
+	  mktmpdir and removes it alfter the test.
+
+	* test/cgi/test_cgi_session.rb (setup, teadown): ditto.
+
 Sat Dec 27 21:46:10 2008  TAKANO Mitsuhiro (takano32)  <tak@n...>
 
 	* ext/dl/test/test_base.rb: use lib64 when the architecture is x86_64.
Index: test/rdoc/test_rdoc_info_formatting.rb
===================================================================
--- test/rdoc/test_rdoc_info_formatting.rb	(revision 21100)
+++ test/rdoc/test_rdoc_info_formatting.rb	(revision 21101)
@@ -8,7 +8,7 @@
 # From chapter 18 of the Pickaxe 3rd ed. and the TexInfo manual.
 class TestRDocInfoFormatting < MiniTest::Unit::TestCase
   def setup
-    @output_dir = File.join Dir.tmpdir, "test_rdoc_info_formatting_#{$$}"
+    @output_dir = File.join Dir.mktmpdir("test_rdoc_"), "info_formatting"
     @output_file = File.join @output_dir, 'rdoc.texinfo'
 
     RDoc::RDoc.new.document(['--fmt=texinfo', '--quiet',
@@ -20,7 +20,7 @@
   end
 
   def teardown
-    # FileUtils.rm_rf @output_dir
+    FileUtils.rm_rf File.dirname(@output_dir)
   end
 
   # Make sure tags like *this* do not make HTML
Index: test/cgi/test_cgi_session.rb
===================================================================
--- test/cgi/test_cgi_session.rb	(revision 21100)
+++ test/cgi/test_cgi_session.rb	(revision 21101)
@@ -7,14 +7,14 @@
 
 class CGISessionTest < Test::Unit::TestCase
   def setup
-    @session_dir = Dir.tmpdir+'/__test_dir__/session_dir/'
+    @session_dir = File.join(Dir.mktmpdir('__test_dir__'), 'session_dir')
     FileUtils.mkdir_p @session_dir
   end
 
   def teardown
     @environ.each do |key, val| ENV.delete(key) end
     $stdout = STDOUT
-    FileUtils.rm_rf(@session_dir)
+    FileUtils.rm_rf(File.dirname(@session_dir))
   end
 
   def test_cgi_session_filestore

Property changes on: test/test_pty.rb
___________________________________________________________________
Name: svn:eol-style
   + LF
Name: svn:keywords
   + Author Id Revision


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

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