aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 4f1370b10..727eccdab 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -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?