aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorilovezfs2016-02-02 23:37:42 -0800
committerXu Cheng2016-02-05 21:52:11 +0800
commitfb9818ae8c3cb3bda4182fc1c0fcb6f1e55e4374 (patch)
treeb558399c33ad87518e2168ec11381526fad1ac85 /Library
parent58cf0ec2b908d4bcd12d77036ef8eac60ee95697 (diff)
downloadbrew-fb9818ae8c3cb3bda4182fc1c0fcb6f1e55e4374.tar.bz2
HOMEBREW_BREW_FILE was unset for the tests
This fixes a regression introduced by 3f6a355, which caused HOMEBREW_BREW_FILE to be unset while running the tests. Patch provided by Xu Cheng.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/lib/config.rb1
-rw-r--r--Library/Homebrew/test/test_integration_cmds.rb6
2 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/test/lib/config.rb b/Library/Homebrew/test/lib/config.rb
index 39c4ae27f..527f2117f 100644
--- a/Library/Homebrew/test/lib/config.rb
+++ b/Library/Homebrew/test/lib/config.rb
@@ -1,6 +1,7 @@
require "tmpdir"
require "pathname"
+HOMEBREW_BREW_FILE = ENV["HOMEBREW_BREW_FILE"]
HOMEBREW_TEMP = Pathname.new(ENV["HOMEBREW_TEMP"] || Dir.tmpdir)
TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") { |k|
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb
index 78f1ca278..d2256ee97 100644
--- a/Library/Homebrew/test/test_integration_cmds.rb
+++ b/Library/Homebrew/test/test_integration_cmds.rb
@@ -7,6 +7,12 @@ require "pathname"
class IntegrationCommandTests < Homebrew::TestCase
def setup
@cmd_id_index = 0 # Assign unique IDs to invocations of `cmd_output`.
+ (HOMEBREW_PREFIX/"bin").mkpath
+ FileUtils.touch HOMEBREW_PREFIX/"bin/brew"
+ end
+
+ def teardown
+ (HOMEBREW_PREFIX/"bin").rmtree
end
def cmd_id_from_args(args)