1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Remove and Restore the original HOME dir (#3057)

This commit is contained in:
Hiroshi SHIBATA 2020-04-24 21:22:05 +09:00 committed by GitHub
parent 5b8c36dfb2
commit c5b17b0354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2020-04-24 21:22:37 +09:00
Merged-By: hsbt <hsbt@ruby-lang.org>

View file

@ -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
@ -69,6 +72,15 @@ class RDoc::TestCase < Test::Unit::TestCase
RDoc::Markup::PreProcess.reset
end
##
# Abstract test-case teardown
def teardown
ENV["HOME"] = @orig_home
super
end
##
# Asserts +path+ is a file