diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-12-23 10:46:25 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-12-23 11:05:09 +0900 |
commit | 792c50e917c6f7a7ed0f3ca8c64b47c005593b41 (patch) | |
tree | 1db2cfe21ce93b10239f601d06916fb4947c88e2 /test/rdoc/support | |
parent | def8ad4072dfdf2c267b31e72a7f7fb7b9472dd2 (diff) |
[ruby/rdoc] Clean up home directories for each test
https://github.com/ruby/rdoc/commit/f067c174da
Diffstat (limited to 'test/rdoc/support')
-rw-r--r-- | test/rdoc/support/test_case.rb | 4 |
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 |