lib/rubocop/cop/rspec/let_before_examples.rb in rubocop-rspec-1.29.1 vs lib/rubocop/cop/rspec/let_before_examples.rb in rubocop-rspec-1.30.0
- old
+ new
@@ -70,9 +70,10 @@
first_example = find_first_example(node)
return unless first_example
node.each_child_node do |child|
next if child.sibling_index < first_example.sibling_index
+
add_offense(child, location: :expression) if let?(child)
end
end
def find_first_example(node)