aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/support
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-25 10:21:38 +0100
committerGitHub2017-02-25 10:21:38 +0100
commit9a0116d5c4967441a6c85656ef7f15795cd02bbc (patch)
tree55fc0cf3ab9772c77274973436982b0815f351df /Library/Homebrew/test/support
parent93e2cb31afa1671c36023d119d9a539373b4be43 (diff)
parentec0f2187a24fcbed41ee58719e0928dfe9155bba (diff)
downloadbrew-9a0116d5c4967441a6c85656ef7f15795cd02bbc.tar.bz2
Merge pull request #2126 from reitermarkus/spec-install
Convert `brew install` test to spec.
Diffstat (limited to 'Library/Homebrew/test/support')
-rw-r--r--Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
index fc7b49fa4..2eb98826a 100644
--- a/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
+++ b/Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
@@ -63,7 +63,15 @@ RSpec.shared_context "integration test" do
def brew(*args)
env = args.last.is_a?(Hash) ? args.pop : {}
+ # Avoid warnings when HOMEBREW_PREFIX/bin is not in PATH.
+ path = [
+ env["PATH"],
+ (HOMEBREW_PREFIX/"bin").realpath.to_s,
+ ENV["PATH"],
+ ].compact.join(File::PATH_SEPARATOR)
+
env.merge!(
+ "PATH" => path,
"HOMEBREW_BREW_FILE" => HOMEBREW_PREFIX/"bin/brew",
"HOMEBREW_INTEGRATION_TEST" => command_id_from_args(args),
"HOMEBREW_TEST_TMPDIR" => TEST_TMPDIR,