Maintenance: Fix ExistsDbStrategy to not depend of the position of the db_strategy hash element.

This commit is contained in:
Rolf Schmidt 2021-12-07 10:32:03 +00:00
parent 15f1c970c8
commit 0b860a58f6

View file

@ -17,7 +17,7 @@ module RuboCop
PATTERN PATTERN
def_node_matcher :has_reset?, <<-PATTERN def_node_matcher :has_reset?, <<-PATTERN
$(send _ {:describe :context :it :shared_examples} (_ ...) (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 PATTERN
MSG = 'Add a `db_strategy: :reset` to your context/decribe when you are creating object manager attributes!'.freeze MSG = 'Add a `db_strategy: :reset` to your context/decribe when you are creating object manager attributes!'.freeze