summaryrefslogtreecommitdiff
path: root/test/rdoc/support/test_case.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rdoc/support/test_case.rb')
-rw-r--r--test/rdoc/support/test_case.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/rdoc/support/test_case.rb b/test/rdoc/support/test_case.rb
index 36009111e2..d98dbe0d7b 100644
--- a/test/rdoc/support/test_case.rb
+++ b/test/rdoc/support/test_case.rb
@@ -37,7 +37,8 @@ class RDoc::TestCase < Test::Unit::TestCase
super
@orig_home = ENV["HOME"]
- ENV["HOME"] = Dir.tmpdir
+ FileUtils.mkdir_p(@test_home = Dir.mktmpdir("test_rdoc_"))
+ ENV["HOME"] = @test_home
@top_level = nil
@@ -64,6 +65,7 @@ class RDoc::TestCase < Test::Unit::TestCase
def teardown
ENV["HOME"] = @orig_home if defined?(@orig_home)
+ defined?(@test_home) and FileUtils.rm_rf @test_home
super
end