File tree Expand file tree Collapse file tree
Library/Homebrew/test/cask Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1116,7 +1116,7 @@ def tmp_cask(name, text)
11161116 homepage "https://brew.sh/"
11171117
11181118 on_arm do
1119- depends_on macos : :big_sur
1119+ depends_on macos : :sequoia
11201120 end
11211121
11221122 depends_on :macos
@@ -1126,11 +1126,29 @@ def tmp_cask(name, text)
11261126 end
11271127
11281128 before do
1129- allow ( audit ) . to receive_messages ( cask_bundle_min_os : MacOSVersion . from_symbol ( :big_sur ) ,
1129+ allow ( audit ) . to receive_messages ( cask_bundle_min_os : MacOSVersion . from_symbol ( :sequoia ) ,
11301130 cask_sparkle_min_os : nil )
11311131 end
11321132
1133- it { is_expected . to pass }
1133+ context "when running on arm" do
1134+ around do |example |
1135+ Homebrew ::SimulateSystem . with ( arch : :arm ) do
1136+ example . run
1137+ end
1138+ end
1139+
1140+ it { is_expected . to pass }
1141+ end
1142+
1143+ context "when running on intel" do
1144+ around do |example |
1145+ Homebrew ::SimulateSystem . with ( arch : :intel ) do
1146+ example . run
1147+ end
1148+ end
1149+
1150+ it { is_expected . to error_with ( /cask declared no minimum macOS version/ ) }
1151+ end
11341152
11351153 it "normalizes 10.16.0 minimum macOS to Big Sur" do
11361154 expect ( audit . send ( :normalize_min_os , "10.16.0" ) ) . to eq ( MacOSVersion . from_symbol ( :big_sur ) )
You can’t perform that action at this time.
0 commit comments