lib/rubocop/rspec/top_level_describe.rb in rubocop-rspec-1.42.0 vs lib/rubocop/rspec/top_level_describe.rb in rubocop-rspec-1.43.0
- old
+ new
@@ -14,11 +14,11 @@
end
private
def top_level_describe?(node)
- return false unless node.method_name == :describe
+ return false unless node.method?(:describe)
top_level_nodes.include?(node)
end
def top_level_nodes
@@ -42,10 +42,10 @@
top_level_nodes.one?
end
def describe_statement_children(node)
node.each_child_node(:send).select do |element|
- element.method_name == :describe
+ element.method?(:describe)
end
end
end
end
end