formula: set HOME to testpath in tests.
This commit is contained in:
parent
26b80ecccc
commit
ae0a7bcad4
@ -605,13 +605,16 @@ class Formula
|
||||
end
|
||||
|
||||
def run_test
|
||||
@oldhome = ENV["HOME"]
|
||||
self.build = Tab.for_formula(self)
|
||||
mktemp do
|
||||
@testpath = Pathname.pwd
|
||||
ENV["HOME"] = @testpath
|
||||
test
|
||||
end
|
||||
ensure
|
||||
@testpath = nil
|
||||
ENV["HOME"] = @oldhome
|
||||
end
|
||||
|
||||
def test_defined?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user