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.rb12
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