Skip to content

Commit d0fc60e

Browse files
committed
Simplify node pattern
1 parent 5031b7d commit d0fc60e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/rubocop/cop/rspec/rails/inferred_spec_type.rb

+3-8
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,9 @@ def on_block(node)
7373
# @return [RuboCop::AST::PairNode, nil]
7474
def_node_matcher :describe_with_type, <<~PATTERN
7575
(block
76-
(send
77-
{ (const nil? :RSpec) | nil? }
78-
_
79-
_
80-
_*
81-
({ hash | kwargs }
82-
<$(pair (sym :type) (sym _)) ...>
83-
)
76+
(send #rspec? #ExampleGroups.all
77+
...
78+
(hash <$(pair (sym :type) sym) ...>)
8479
)
8580
...
8681
)

0 commit comments

Comments
 (0)