Module: Minitest
- Defined in:
- lib/minitest/line_plugin.rb,
lib/minitest/line/describe_track.rb
Defined Under Namespace
Modules: Line
Classes: LineReporter
Class Method Summary
collapse
Class Method Details
.plugin_line_init(options) ⇒ Object
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/minitest/line_plugin.rb', line 45
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
|
.plugin_line_inject_reporter ⇒ Object
91
92
|
# File 'lib/minitest/line_plugin.rb', line 91
def self.plugin_line_inject_reporter
end
|
.plugin_line_options(opts, options) ⇒ Object
39
40
41
42
43
|
# File 'lib/minitest/line_plugin.rb', line 39
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
|