cask/cmd/list_spec.rb: fix leaky version variable

The lazy evaluation in let() was failing to reset MacOS#full_version
to the original_macos_version. This meant that all tests run after
this one automatically had MacOS#version == 12 which caused some
of the tests to fail if you were running a different macOS version.
This commit is contained in:
apainintheneck 2022-07-11 15:04:10 -07:00
parent 8dd96ae8ba
commit ee68f813d8

View File

@ -246,7 +246,7 @@ describe Cask::Cmd::List, :cask do
]
EOS
}
let(:original_macos_version) { MacOS.full_version.to_s }
let!(:original_macos_version) { MacOS.full_version.to_s }
before do
# Use a more limited symbols list to shorten the variations hash