test/cask: Fix "System Settings" caveats for (non-)Ventura OSes
- "System Preferences" was updated to be "System Settings" in macOS Ventura. This naming was updated in our caveats generator in PR 14997. - This test was failing for me locally (on Ventura) because it was hardcoded to expect `System Preferences => Security & Privacy`, but getting `System Settings => Privacy & Security`. - This is not the most important thing in the world, we can probably live with the failing test, but I thought I'd try to fix it anyway.
This commit is contained in:
parent
b3684e55a7
commit
6b4b923b44
@ -217,15 +217,19 @@ describe Cask::Cask, :cask do
|
|||||||
end
|
end
|
||||||
|
|
||||||
describe "#to_h" do
|
describe "#to_h" do
|
||||||
let(:json_file) { "#{TEST_FIXTURE_DIR}/cask/everything.json" }
|
let(:expected_json) { File.read("#{TEST_FIXTURE_DIR}/cask/everything.json").strip }
|
||||||
let(:expected_json) { File.read(json_file).strip }
|
let(:expected_json_ventura) { File.read("#{TEST_FIXTURE_DIR}/cask/everything-ventura-caveats.json").strip }
|
||||||
|
|
||||||
context "when loaded from cask file" do
|
context "when loaded from cask file" do
|
||||||
it "returns expected hash" do
|
it "returns expected hash" do
|
||||||
hash = Cask::CaskLoader.load("everything").to_h
|
hash = Cask::CaskLoader.load("everything").to_h
|
||||||
|
|
||||||
expect(hash).to be_a(Hash)
|
expect(hash).to be_a(Hash)
|
||||||
expect(JSON.pretty_generate(hash)).to eq(expected_json)
|
if MacOS.version >= :ventura
|
||||||
|
expect(JSON.pretty_generate(hash)).to eq(expected_json_ventura)
|
||||||
|
else
|
||||||
|
expect(JSON.pretty_generate(hash)).to eq(expected_json)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,99 @@
|
|||||||
|
{
|
||||||
|
"token": "everything",
|
||||||
|
"full_token": "everything",
|
||||||
|
"tap": "homebrew/cask",
|
||||||
|
"name": [
|
||||||
|
"Everything"
|
||||||
|
],
|
||||||
|
"desc": "Little bit of everything",
|
||||||
|
"homepage": "https://www.everything.app/",
|
||||||
|
"url": "https://cachefly.everything.app/releases/Everything_1.2.3.zip",
|
||||||
|
"url_specs": {
|
||||||
|
"cookies": {
|
||||||
|
"ALL": "1234"
|
||||||
|
},
|
||||||
|
"user_agent": ":fake"
|
||||||
|
},
|
||||||
|
"appcast": null,
|
||||||
|
"version": "1.2.3",
|
||||||
|
"versions": {
|
||||||
|
},
|
||||||
|
"installed": null,
|
||||||
|
"outdated": false,
|
||||||
|
"sha256": "c64c05bdc0be845505d6e55e69e696a7f50d40846e76155f0c85d5ff5e7bbb84",
|
||||||
|
"artifacts": [
|
||||||
|
{
|
||||||
|
"uninstall": [
|
||||||
|
{
|
||||||
|
"launchctl": "com.every.thing.agent",
|
||||||
|
"delete": [
|
||||||
|
"/Library/EverythingHelperTools"
|
||||||
|
],
|
||||||
|
"kext": "com.every.thing.driver",
|
||||||
|
"signal": [
|
||||||
|
[
|
||||||
|
"TERM",
|
||||||
|
"com.every.thing.controller1"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"TERM",
|
||||||
|
"com.every.thing.bin"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"installer": [
|
||||||
|
{
|
||||||
|
"script": {
|
||||||
|
"executable": "~/just/another/path/install.sh",
|
||||||
|
"args": [
|
||||||
|
"--mode=silent"
|
||||||
|
],
|
||||||
|
"sudo": true,
|
||||||
|
"print_stderr": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"app": [
|
||||||
|
"Everything.app"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"zap": [
|
||||||
|
{
|
||||||
|
"trash": [
|
||||||
|
"~/.everything",
|
||||||
|
"~/Library/Everything"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"caveats": "Installing everything might take a while...\n\neverything requires a kernel extension to work.\nIf the installation fails, retry after you enable it in:\n System Settings → Privacy & Security\n\nFor more information, refer to vendor documentation or this Apple Technical Note:\n https://developer.apple.com/library/content/technotes/tn2459/_index.html\n",
|
||||||
|
"depends_on": {
|
||||||
|
"cask": [
|
||||||
|
"something"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"conflicts_with": {
|
||||||
|
"formula": [
|
||||||
|
"nothing"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"container": {
|
||||||
|
"type": "naked"
|
||||||
|
},
|
||||||
|
"auto_updates": true,
|
||||||
|
"tap_git_head": null,
|
||||||
|
"languages": [
|
||||||
|
"en",
|
||||||
|
"eo"
|
||||||
|
],
|
||||||
|
"ruby_source_checksum": {
|
||||||
|
"sha256": "b2707d1952f02c3fa566b7ad2a707a847a959d36f51d3dee642dbe5deec12f27"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user