module Minitest

def self.plugin_line_init(options)

def self.plugin_line_init(options)
  unless exp_line = options[:line]
    reporter.reporters << LineReporter.new
    return
  end
  tests = Minitest::Line.tests_with_lines
  filter, _ = tests.sort_by { |n, l| -l }.detect { |n, l| exp_line >= l }
  raise "Could not find test method before line #{exp_line}" unless filter
  options[:filter] = filter
end

def self.plugin_line_inject_reporter

def self.plugin_line_inject_reporter
end

def self.plugin_line_options(opts, options)

def self.plugin_line_options(opts, options)
  opts.on '-l', '--line N', Integer, "Run test at line number" do |lineno|
    options[:line] = lineno
  end
end