lib/rubocop/cop/rspec/leading_subject.rb in rubocop-rspec-2.15.0 vs lib/rubocop/cop/rspec/leading_subject.rb in rubocop-rspec-2.16.0

- old
+ new

@@ -42,19 +42,19 @@ return unless inside_example_group?(node) check_previous_nodes(node) end + private + def check_previous_nodes(node) offending_node(node) do |offender| msg = format(MSG, offending: offender.method_name) add_offense(node, message: msg) do |corrector| autocorrect(corrector, node, offender) end end end - - private def offending_node(node) parent(node).each_child_node.find do |sibling| break if sibling.equal?(node)