lib/rubocop/cop/mixin/minitest_exploration_helpers.rb in rubocop-minitest-0.10.0 vs lib/rubocop/cop/mixin/minitest_exploration_helpers.rb in rubocop-minitest-0.10.1

- old
+ new

@@ -24,10 +24,10 @@ def test_class?(class_node) class_node.parent_class && class_node.identifier.source.end_with?('Test') end def test_case?(node) - return false unless node.def_type? && test_case_name?(node.method_name) + return false unless node&.def_type? && test_case_name?(node.method_name) class_ancestor = node.each_ancestor(:class).first test_class?(class_ancestor) end