From 0c835afac0524cddd43e8a56da4efd9e45b17a83 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 27 Dec 2008 13:41:04 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ test/cgi/test_cgi_session.rb | 4 ++-- test/rdoc/test_rdoc_info_formatting.rb | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 24d5bd8e35..bc574d397f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Dec 27 22:41:02 2008 Nobuyoshi Nakada + + * 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) * ext/dl/test/test_base.rb: use lib64 when the architecture is x86_64. diff --git a/test/cgi/test_cgi_session.rb b/test/cgi/test_cgi_session.rb index 4fcb936d4e..6cccb22240 100644 --- a/test/cgi/test_cgi_session.rb +++ b/test/cgi/test_cgi_session.rb @@ -7,14 +7,14 @@ require 'tmpdir' 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 diff --git a/test/rdoc/test_rdoc_info_formatting.rb b/test/rdoc/test_rdoc_info_formatting.rb index 87147fb7cb..c10532aa17 100644 --- a/test/rdoc/test_rdoc_info_formatting.rb +++ b/test/rdoc/test_rdoc_info_formatting.rb @@ -8,7 +8,7 @@ require 'rdoc/generator/texinfo' # 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 @@ class TestRDocInfoFormatting < MiniTest::Unit::TestCase 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