Only run to_hash_with_variations test on macOS

This commit is contained in:
Rylan Polster 2022-07-21 17:33:19 +02:00
parent 243ff024e3
commit 7255df1ec2
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -905,7 +905,7 @@ describe Formula do
expect(h["versions"]["bottle"]).to be_truthy
end
describe "#to_hash_with_variations" do
describe "#to_hash_with_variations", :needs_macos do
let(:formula_path) { CoreTap.new.formula_dir/"foo-variations.rb" }
let(:formula_content) do
<<~RUBY
@ -983,7 +983,7 @@ describe Formula do
stub_const("MacOSVersions::SYMBOLS", symbols)
# For consistency, always run on Monterey and ARM
MacOS.full_version = "12"
allow(MacOS).to receive(:version).and_return(MacOS::Version.new("12"))
allow(Hardware::CPU).to receive(:type).and_return(:arm)
formula_path.dirname.mkpath