test/cask: Rename 'expected_json_ventura' since it's >= Ventura

- Let's actually show in the fixtures JSON filename what's changed
  between the two.
This commit is contained in:
Issy Long 2023-03-18 15:16:15 +00:00
parent 6b4b923b44
commit 865e99c611
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
2 changed files with 4 additions and 2 deletions

View File

@ -218,7 +218,9 @@ describe Cask::Cask, :cask do
describe "#to_h" do describe "#to_h" do
let(:expected_json) { File.read("#{TEST_FIXTURE_DIR}/cask/everything.json").strip } let(:expected_json) { File.read("#{TEST_FIXTURE_DIR}/cask/everything.json").strip }
let(:expected_json_ventura) { File.read("#{TEST_FIXTURE_DIR}/cask/everything-ventura-caveats.json").strip } let(:expected_json_after_ventura) do
File.read("#{TEST_FIXTURE_DIR}/cask/everything-systemsettings-caveats.json").strip
end
context "when loaded from cask file" do context "when loaded from cask file" do
it "returns expected hash" do it "returns expected hash" do
@ -226,7 +228,7 @@ describe Cask::Cask, :cask do
expect(hash).to be_a(Hash) expect(hash).to be_a(Hash)
if MacOS.version >= :ventura if MacOS.version >= :ventura
expect(JSON.pretty_generate(hash)).to eq(expected_json_ventura) expect(JSON.pretty_generate(hash)).to eq(expected_json_after_ventura)
else else
expect(JSON.pretty_generate(hash)).to eq(expected_json) expect(JSON.pretty_generate(hash)).to eq(expected_json)
end end