diff options
| author | Mike McQuaid | 2015-01-08 20:58:57 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-09 11:35:03 +0000 |
| commit | ae0a7bcad40b83763e2c7cbbe67da97c972ade6c (patch) | |
| tree | a97573a88b1ba20441c6d3e6329bbe0809dbba17 | |
| parent | 26b80ecccca8db33fb067158634ac54630fec2d0 (diff) | |
| download | brew-ae0a7bcad40b83763e2c7cbbe67da97c972ade6c.tar.bz2 | |
formula: set HOME to testpath in tests.
| -rw-r--r-- | Library/Homebrew/formula.rb | 3 |
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? |
