tests: update determine-test-runners tests

We've decoupled the macOS versions there from
`MacOSVersion#supported_release?`, so these tests need updating.
This commit is contained in:
Carlo Cabrera 2024-09-11 20:20:08 +08:00
parent 4ab19e09da
commit c51bb196d1
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,8 @@ RSpec.describe Homebrew::DevCmd::DetermineTestRunners do
out = []
MacOSVersion::SYMBOLS.each_value do |v|
macos_version = MacOSVersion.new(v)
next if macos_version.unsupported_release?
next if macos_version < :monterey
next if macos_version > :sonoma
out << "#{v}-x86_64"
out << "#{v}-arm64"

View File

@ -11,8 +11,9 @@ RSpec.describe GitHubRunnerMatrix do
allow(ENV).to receive(:fetch).with("GITHUB_RUN_ID").and_return("12345")
end
# FIXME: Avoid changing this every time we change Homebrew/core CI runner macOS versions.
let(:newest_supported_macos) do
MacOSVersion::SYMBOLS.find { |_, v| !MacOSVersion.new(v).prerelease? }
MacOSVersion::SYMBOLS.find { |k, _| k == :sonoma }
end
let(:testball) { TestRunnerFormula.new(Testball.new) }