lib/rubocop/rspec/top_level_describe.rb in rubocop-rspec-1.24.0 vs lib/rubocop/rspec/top_level_describe.rb in rubocop-rspec-1.25.0

- old
+ new

@@ -10,20 +10,17 @@ def on_send(node) return unless respond_to?(:on_top_level_describe) return unless top_level_describe?(node) - _receiver, _method_name, *args = *node - - on_top_level_describe(node, args) + on_top_level_describe(node, node.arguments) end private def top_level_describe?(node) - _receiver, method_name, *_args = *node - return false unless method_name == :describe + return false unless node.method_name == :describe top_level_nodes.include?(node) end def top_level_nodes @@ -47,10 +44,10 @@ top_level_nodes.one? end def describe_statement_children(node) node.each_child_node(:send).select do |element| - element.children[1] == :describe + element.method_name == :describe end end end end end