diff --git a/Library/Homebrew/test/formula_spec.rb b/Library/Homebrew/test/formula_spec.rb index 3cf2db1aa8..79f484096e 100644 --- a/Library/Homebrew/test/formula_spec.rb +++ b/Library/Homebrew/test/formula_spec.rb @@ -996,7 +996,7 @@ describe Formula do expect(f).to pour_bottle end - it "returns false when set with a symbol" do + it "returns false with `reason: :clt_required` on macOS", :needs_macos do # Pretend CLT is not installed allow(MacOS::CLT).to receive(:installed?).and_return(false) @@ -1009,7 +1009,7 @@ describe Formula do expect(f).not_to pour_bottle end - it "returns true when set with a symbol" do + it "returns true with `reason: :clt_required` on macOS", :needs_macos do # Pretend CLT is installed allow(MacOS::CLT).to receive(:installed?).and_return(true) @@ -1022,6 +1022,16 @@ describe Formula do expect(f).to pour_bottle end + it "returns true with `reason: :clt_required` on Linux", :needs_linux do + f = formula "foo" do + url "foo-1.0" + + pour_bottle? reason: :clt_required + end + + expect(f).to pour_bottle + end + it "throws an error if passed both a symbol and a block" do expect do formula "foo" do