From 624010674c602ac02718b4c9731892c1cac615e9 Mon Sep 17 00:00:00 2001 From: Daniel Vandersluis Date: Mon, 27 Jan 2025 15:06:06 -0500 Subject: [PATCH] Use node groups in node patterns to replace unions of types `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. --- lib/rubocop/cop/capybara/rspec/predicate_matcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubocop/cop/capybara/rspec/predicate_matcher.rb b/lib/rubocop/cop/capybara/rspec/predicate_matcher.rb index 669cd87d..787a668f 100644 --- a/lib/rubocop/cop/capybara/rspec/predicate_matcher.rb +++ b/lib/rubocop/cop/capybara/rspec/predicate_matcher.rb @@ -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)