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
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue