From b32fafa82c4b9d6890685dc53fa52abcd1d1030f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 11 Nov 2016 16:42:29 +0000 Subject: 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. --- Library/Homebrew/test/testing_env.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/test') 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 -- cgit v1.2.3