From 0e60fd5f62fd857a79f61451aedbe52bc3e1c9c1 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Tue, 7 Dec 2021 10:32:03 +0000 Subject: [PATCH] Maintenance: Fix ExistsDbStrategy to not depend of the position of the db_strategy hash element. --- .rubocop/cop/zammad/exists_db_strategy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop/cop/zammad/exists_db_strategy.rb b/.rubocop/cop/zammad/exists_db_strategy.rb index f825e2bfc..33fd0de2f 100644 --- a/.rubocop/cop/zammad/exists_db_strategy.rb +++ b/.rubocop/cop/zammad/exists_db_strategy.rb @@ -17,7 +17,7 @@ module RuboCop PATTERN def_node_matcher :has_reset?, <<-PATTERN - $(send _ {:describe :context :it} (_ ...) (hash ... (pair (sym :db_strategy) (sym {:reset :reset_all})))) + $(send _ {:describe :context :it :shared_examples} (_ ...) (hash <(pair (sym :db_strategy) (sym {:reset :reset_all})) ...> )) PATTERN MSG = 'Add a `db_strategy: :reset` to your context/decribe when you are creating object manager attributes!'.freeze