formula: set HOME to testpath in tests.

This commit is contained in:
Mike McQuaid 2015-01-08 20:58:57 +00:00
parent 26b80ecccc
commit ae0a7bcad4

View File

@ -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?