summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-28 09:42:26 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-12-28 09:42:26 +0000
commit6f92f56042cb9ce4a290f5eda4535e423d589570 (patch)
tree5cc905efc64d2e5dc7b6c655b04c67c17c6e6f70 /test
parenta90a01acee452bac96ac2a5cdfdc0780c330f6b6 (diff)
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/cgi/test_cgi_session.rb4
-rw-r--r--test/rdoc/test_rdoc_info_formatting.rb4
2 files changed, 4 insertions, 4 deletions
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