diff --git a/Library/Homebrew/test/formula_spec.rb b/Library/Homebrew/test/formula_spec.rb index 182fbc8781..f632ae7481 100644 --- a/Library/Homebrew/test/formula_spec.rb +++ b/Library/Homebrew/test/formula_spec.rb @@ -997,14 +997,15 @@ describe Formula do end it "returns false when set with a symbol" do + # Ensure that prefix does not match the default + stub_const "Homebrew::DEFAULT_PREFIX", "foo" + f = formula "foo" do url "foo-1.0" pour_bottle? :default_prefix_required end - # Homebrew::DEFAULT_PREFIX is still /usr/local or /opt/homebrew - # and HOMEBREW_PREFIX is a temporary test directory expect(f).not_to pour_bottle end