test/os/mac/diagnostic: fix when env is not set

This commit is contained in:
Bo Anderson 2023-11-22 01:02:46 +00:00
parent 6502524456
commit ad2c1c9bad
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -35,6 +35,7 @@ describe Homebrew::Diagnostic::Checks do
allow(OS::Mac).to receive(:version).and_return(macos_version)
allow(OS::Mac).to receive(:full_version).and_return(macos_version)
stub_const("RUBY_VERSION", "1.8.6")
ENV["HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH"] = "1"
expect(checks.check_ruby_version)
.to match "Ruby version 1.8.6 is unsupported on macOS 10.12"