diff --git a/Library/Homebrew/test/rubocops/cask/no_overrides_spec.rb b/Library/Homebrew/test/rubocops/cask/no_overrides_spec.rb index 60d7263d59..e6fe0aef90 100644 --- a/Library/Homebrew/test/rubocops/cask/no_overrides_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/no_overrides_spec.rb @@ -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