Skip to content

Commit

Permalink
Simplify node pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj authored and r7kamura committed Oct 19, 2022
1 parent 7ffbdcc commit 8999eb7
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/rubocop/cop/rspec/rails/inferred_spec_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,9 @@ def on_block(node)
# @return [RuboCop::AST::PairNode, nil]
def_node_matcher :describe_with_type, <<~PATTERN
(block
(send
{ (const nil? :RSpec) | nil? }
_
_
_*
({ hash | kwargs }
<$(pair (sym :type) (sym _)) ...>
)
(send #rspec? #ExampleGroups.all
...
(hash <$(pair (sym :type) sym) ...>)
)
...
)
Expand Down

0 comments on commit 8999eb7

Please sign in to comment.