Add a failing test for the arch inside url inside on_* weirdness

- So that I remember what's up with this after some sleep.
This commit is contained in:
Issy Long 2023-03-22 00:23:33 +00:00
parent 8091e603df
commit bc796a3120
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -38,6 +38,22 @@ describe RuboCop::Cop::Cask::NoOverrides do
include_examples "does not report any offenses"
end
context "when there are `arch` variables in the `url` in the `on_*` blocks" do
let(:source) do
<<~CASK
cask 'foo' do
arch arm: "arm64", intel: "x86"
version = '1.2.3'
on_mojave :or_later do
url "https://brew.sh/foo-\#{version}-\#{arch}.pkg"
end
end
CASK
end
include_examples "does not report any offenses"
end
context "when there are livecheck blocks within `on_*` blocks, ignore their contents" do
let(:source) do
<<~CASK