lib/rubocop/cop/rspec/let_before_examples.rb in rubocop-rspec-1.25.1 vs lib/rubocop/cop/rspec/let_before_examples.rb in rubocop-rspec-1.26.0
- old
+ new
@@ -33,10 +33,11 @@
class LetBeforeExamples < Cop
include RangeHelp
MSG = 'Move `let` before the examples in the group.'.freeze
- def_node_matcher :let?, '(block (send nil? {:let :let!} ...) ...)'
+ def_node_matcher :let?, Helpers::ALL.block_pattern
+
def_node_matcher :example_or_group?, <<-PATTERN
{
#{(Examples::ALL + ExampleGroups::ALL).block_pattern}
#{Includes::EXAMPLES.send_pattern}
}