diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-04-24 21:22:05 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-24 21:22:05 +0900 |
commit | c5b17b0354755c6540e8cd51aea0a30773437eaf (patch) | |
tree | 567115d5c2054d6114143d3f13adb63e9f847fc3 /test/rdoc/support | |
parent | 5b8c36dfb25a060543fcec00abe34d516fcb44f6 (diff) |
Remove and Restore the original HOME dir (#3057)
Notes
Notes:
Merged-By: hsbt <[email protected]>
Diffstat (limited to 'test/rdoc/support')
-rw-r--r-- | test/rdoc/support/test_case.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/rdoc/support/test_case.rb b/test/rdoc/support/test_case.rb index 9a4f04b76e..bce480252f 100644 --- a/test/rdoc/support/test_case.rb +++ b/test/rdoc/support/test_case.rb @@ -49,6 +49,9 @@ class RDoc::TestCase < Test::Unit::TestCase def setup super + @orig_home = ENV["HOME"] + ENV["HOME"] = Dir.tmpdir + @top_level = nil @RM = RDoc::Markup @@ -70,6 +73,15 @@ class RDoc::TestCase < Test::Unit::TestCase end ## + # Abstract test-case teardown + + def teardown + ENV["HOME"] = @orig_home + + super + end + + ## # Asserts +path+ is a file def assert_file path |