Fix tests

This commit is contained in:
Rylan Polster 2022-06-24 17:20:03 -04:00
parent f38db6e100
commit d96a8fd35e
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -246,10 +246,9 @@ describe Cask::Cmd::List, :cask do
] ]
EOS EOS
} }
let(:original_macos_version) { MacOS.full_version.to_s }
before do before do
casks.map(&Cask::CaskLoader.method(:load)).each(&InstallHelper.method(:install_with_caskfile))
# Use a more limited symbols list to shorten the variations hash # Use a more limited symbols list to shorten the variations hash
symbols = { symbols = {
monterey: "12", monterey: "12",
@ -262,6 +261,12 @@ describe Cask::Cmd::List, :cask do
# For consistency, always run on Monterey and ARM # For consistency, always run on Monterey and ARM
MacOS.full_version = "12" MacOS.full_version = "12"
allow(Hardware::CPU).to receive(:type).and_return(:arm) allow(Hardware::CPU).to receive(:type).and_return(:arm)
casks.map(&Cask::CaskLoader.method(:load)).each(&InstallHelper.method(:install_with_caskfile))
end
after do
MacOS.full_version = original_macos_version
end end
it "of all installed Casks" do it "of all installed Casks" do