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

ruby-changes:9590

From: yugui <ko1@a...>
Date: Sun, 28 Dec 2008 18:43:10 +0900 (JST)
Subject: [ruby-changes:9590] Ruby:r21129 (ruby_1_9_1): merges r21101 from trunk into ruby_1_9_1.

yugui	2008-12-28 18:42:26 +0900 (Sun, 28 Dec 2008)

  New Revision: 21129

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

  Log:
    merges r21101 from trunk into ruby_1_9_1.
    * 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:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/test/cgi/test_cgi_session.rb
    branches/ruby_1_9_1/test/rdoc/test_rdoc_info_formatting.rb

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 21128)
+++ ruby_1_9_1/ChangeLog	(revision 21129)
@@ -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.
+
 Sun Dec 28 12:53:10 2008  TAKANO Mitsuhiro (takano32)  <tak@n...>
 
 	* ext/dl/test/test_base.rb: use libc.dylib when the platform is darwin.
Index: ruby_1_9_1/test/rdoc/test_rdoc_info_formatting.rb
===================================================================
--- ruby_1_9_1/test/rdoc/test_rdoc_info_formatting.rb	(revision 21128)
+++ ruby_1_9_1/test/rdoc/test_rdoc_info_formatting.rb	(revision 21129)
@@ -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: ruby_1_9_1/test/cgi/test_cgi_session.rb
===================================================================
--- ruby_1_9_1/test/cgi/test_cgi_session.rb	(revision 21128)
+++ ruby_1_9_1/test/cgi/test_cgi_session.rb	(revision 21129)
@@ -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

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

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