Skip to content

Commit

Permalink
Use node groups in node patterns to replace unions of types
Browse files Browse the repository at this point in the history
`rubocop-ast` defines some node groups (https://github.com/rubocop/rubocop-ast/blob/master/lib/rubocop/ast/node.rb#L89-L116) that can be used inside node pattern matchers in place of a union of node types.
  • Loading branch information
dvandersluis committed Jan 27, 2025
1 parent f2566c8 commit e113029
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cop/capybara/rspec/predicate_matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def check_inflected(node)

# @!method be_bool?(node)
def_node_matcher :be_bool?, <<~PATTERN
(send nil? {:be :eq :eql :equal} {true false})
(send nil? {:be :eq :eql :equal} boolean)
PATTERN

# @!method be_boolthy?(node)
Expand Down

0 comments on commit e113029

Please sign in to comment.