lib/rubocop/cop/rspec/let_before_examples.rb in rubocop-rspec-2.18.1 vs lib/rubocop/cop/rspec/let_before_examples.rb in rubocop-rspec-2.19.0
- old
+ new
@@ -36,19 +36,19 @@
MSG = 'Move `let` before the examples in the group.'
# @!method example_or_group?(node)
def_node_matcher :example_or_group?, <<-PATTERN
{
- #{block_pattern('{#ExampleGroups.all #Examples.all}')}
- #{send_pattern('#Includes.examples')}
+ (block (send nil? {#ExampleGroups.all #Examples.all} ...) ...)
+ (send nil? #Includes.examples ...)
}
PATTERN
# @!method include_examples?(node)
def_node_matcher :include_examples?, <<~PATTERN
{
- #{block_pattern(':include_examples')}
- #{send_pattern(':include_examples')}
+ (block (send nil? :include_examples ...) ...)
+ (send nil? :include_examples ...)
}
PATTERN
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
return unless example_group_with_body?(node)