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:
parent
5b8c36dfb2
commit
c5b17b0354
Notes:
git
2020-04-24 21:22:37 +09:00
Merged-By: hsbt <hsbt@ruby-lang.org>
1 changed files with 12 additions and 0 deletions
|
@ -49,6 +49,9 @@ class RDoc::TestCase < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
super
|
super
|
||||||
|
|
||||||
|
@orig_home = ENV["HOME"]
|
||||||
|
ENV["HOME"] = Dir.tmpdir
|
||||||
|
|
||||||
@top_level = nil
|
@top_level = nil
|
||||||
|
|
||||||
@RM = RDoc::Markup
|
@RM = RDoc::Markup
|
||||||
|
@ -69,6 +72,15 @@ class RDoc::TestCase < Test::Unit::TestCase
|
||||||
RDoc::Markup::PreProcess.reset
|
RDoc::Markup::PreProcess.reset
|
||||||
end
|
end
|
||||||
|
|
||||||
|
##
|
||||||
|
# Abstract test-case teardown
|
||||||
|
|
||||||
|
def teardown
|
||||||
|
ENV["HOME"] = @orig_home
|
||||||
|
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# Asserts +path+ is a file
|
# Asserts +path+ is a file
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue