diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb index c1e8780e86585..1b9c6cba5a6b9 100644 --- a/Library/Homebrew/dependency.rb +++ b/Library/Homebrew/dependency.rb @@ -41,7 +41,7 @@ def hash end def to_formula - formula = Formulary.factory(name) + formula = Formulary.factory(name, warn: false) formula.build = BuildOptions.new(options, formula.options) formula end diff --git a/Library/Homebrew/test/utils/autoremove_spec.rb b/Library/Homebrew/test/utils/autoremove_spec.rb index 258eb2b85c8ef..51ce249bb9136 100644 --- a/Library/Homebrew/test/utils/autoremove_spec.rb +++ b/Library/Homebrew/test/utils/autoremove_spec.rb @@ -54,7 +54,7 @@ include_context "with formulae for dependency testing" before do - allow(Formulary).to receive(:factory).with("three").and_return(formula_is_build_dep) + allow(Formulary).to receive(:factory).with("three", { warn: false }).and_return(formula_is_build_dep) end context "when formulae are bottles" do