module Minitest::Line
def methods_with_lines(target_file)
def methods_with_lines(target_file) runnables.flat_map do |runnable| rname = runnable.name runnable.runnable_methods.map do |name| file, line = runnable.instance_method(name).source_location next unless file == target_file test_name = (rname ? "#{rname}##{name}" : name) [test_name, line] end end.uniq.compact end