aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/testing_env.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-11-11 16:42:29 +0000
committerMike McQuaid2016-11-11 16:42:29 +0000
commitb32fafa82c4b9d6890685dc53fa52abcd1d1030f (patch)
treef665de6194c272fac15d1bc0691858373437ccec /Library/Homebrew/test/testing_env.rb
parent8fea516dcdc68680c4841d2547be209f16d32203 (diff)
downloadbrew-b32fafa82c4b9d6890685dc53fa52abcd1d1030f.tar.bz2
formulary: don't warn on old formula name from keg/rack.
If there’s an old installation of e.g. `apple-gcc42` from when it was part of `homebrew/core` then the tab will say it was from the `homebrew/core` tap and then we’ll complain at the user (see #1459 for an example). Instead, we only want to complain when the user actually types in `homebrew/core/apple-gcc42` into a `brew` command. Closes #1459.
Diffstat (limited to 'Library/Homebrew/test/testing_env.rb')
-rw-r--r--Library/Homebrew/test/testing_env.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb
index 5f98ace15..b6612535a 100644
--- a/Library/Homebrew/test/testing_env.rb
+++ b/Library/Homebrew/test/testing_env.rb
@@ -119,7 +119,8 @@ module Homebrew
def stub_formula_loader(formula, ref = formula.full_name)
loader = mock
loader.stubs(:get_formula).returns(formula)
- Formulary.stubs(:loader_for).with(ref).returns(loader)
+ Formulary.stubs(:loader_for).with(ref, from: :keg).returns(loader)
+ Formulary.stubs(:loader_for).with(ref, from: nil).returns(loader)
end
end
end