From 7255df1ec266890f791d6262a8de25bbdf292a43 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Thu, 21 Jul 2022 17:33:19 +0200 Subject: [PATCH] Only run `to_hash_with_variations` test on macOS --- Library/Homebrew/test/formula_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/test/formula_spec.rb b/Library/Homebrew/test/formula_spec.rb index d4904f4a7f..d4680abd7f 100644 --- a/Library/Homebrew/test/formula_spec.rb +++ b/Library/Homebrew/test/formula_spec.rb @@ -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