From 722a8eda3c5f36d844083088608fefc6d2486f6c Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Tue, 18 May 2021 01:55:06 -0400 Subject: [PATCH] Fix tests --- Library/Homebrew/test/formula_spec.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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