Fix tests

This commit is contained in:
Rylan Polster 2021-05-18 01:55:06 -04:00
parent 69e29a358b
commit 722a8eda3c
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -996,7 +996,7 @@ describe Formula do
expect(f).to pour_bottle expect(f).to pour_bottle
end 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 # Pretend CLT is not installed
allow(MacOS::CLT).to receive(:installed?).and_return(false) allow(MacOS::CLT).to receive(:installed?).and_return(false)
@ -1009,7 +1009,7 @@ describe Formula do
expect(f).not_to pour_bottle expect(f).not_to pour_bottle
end 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 # Pretend CLT is installed
allow(MacOS::CLT).to receive(:installed?).and_return(true) allow(MacOS::CLT).to receive(:installed?).and_return(true)
@ -1022,6 +1022,16 @@ describe Formula do
expect(f).to pour_bottle expect(f).to pour_bottle
end 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 it "throws an error if passed both a symbol and a block" do
expect do expect do
formula "foo" do formula "foo" do