From e51ad414341892ca74b77354365076f3ea0cb1d4 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 15 Apr 2023 23:09:39 +0100 Subject: [PATCH] Delete a Cask RuboCop test for an edge case that is not fixed - This test tests nothing. And the TODO comment is wrong. - We _could_ fix it, but it's a very edgy edge case which pertains to `livecheck` blocks which currently don't have stanza grouping or ordering cop support. If we decide in the future to add these, we can add this back too (provided I remember). - Also I think I may have got confused with the stanza grouping vs. stanza ordering cops when writing this, rendering this test more useless. --- .../rubocops/cask/stanza_grouping_spec.rb | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb index 46e8bc6973..830fab83e4 100644 --- a/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb +++ b/Library/Homebrew/test/rubocops/cask/stanza_grouping_spec.rb @@ -579,38 +579,5 @@ describe RuboCop::Cop::Cask::StanzaGrouping do include_examples "autocorrects source" end - - # TODO: Maybe this should be fixed too? - describe "inner erroneously grouped nested livecheck block contents are ignored" do - let(:source) do - <<~CASK - cask 'foo' do - on_arm do - version "1.0.2" - sha256 :no_check - - url "https://foo.brew.sh/foo-arm.zip" - - livecheck do - url "https://foo.brew.sh/foo-arm-versions.html" - end - end - on_intel do - version "0.9.8" - sha256 :no_check - - url "https://foo.brew.sh/foo-intel.zip" - - livecheck do - regex(/RegExhibit\s+(\d+(?:.\d+)+)/i) - url "https://foo.brew.sh/foo-intel-versions.html" - end - end - end - CASK - end - - include_examples "does not report any offenses" - end end end