From 9153a22fc9c88cfa56f90d0e82e8a5c39133277d Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Mon, 25 Aug 2025 01:07:53 -0400 Subject: [PATCH] Fix `utils/autoremove` tests --- Library/Homebrew/test/utils/autoremove_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/utils/autoremove_spec.rb b/Library/Homebrew/test/utils/autoremove_spec.rb index b078d3e7e9..59c14b85c1 100644 --- a/Library/Homebrew/test/utils/autoremove_spec.rb +++ b/Library/Homebrew/test/utils/autoremove_spec.rb @@ -65,7 +65,8 @@ RSpec.describe Utils::Autoremove do include_context "with formulae for dependency testing" before do - allow(Formulary).to receive(:factory).with("three", { warn: false }).and_return(formula_is_build_dep) + allow(Formulary).to receive(:factory).with("three", { prefer_stub: false, warn: false }) + .and_return(formula_is_build_dep) end context "when formulae are bottles" do