lib/spoom/deadcode/plugins/minitest.rb in spoom-1.3.2 vs lib/spoom/deadcode/plugins/minitest.rb in spoom-1.3.3

- old
+ new

@@ -16,12 +16,13 @@ "before_all", "setup", "teardown", ) - sig { override.params(indexer: Indexer, definition: Definition).void } - def on_define_method(indexer, definition) - definition.ignored! if indexer.path.match?(%r{test/.*test\.rb$}) && definition.name.match?(/^test_/) + sig { override.params(definition: Model::Method).void } + def on_define_method(definition) + file = definition.location.file + @index.ignore(definition) if file.match?(%r{test/.*test\.rb$}) && definition.name.match?(/^test_/) end end end end end