Module: Minitest

Defined in:
lib/minitest/json_reporter_plugin.rb

Defined Under Namespace

Classes: JsonReporter

Class Method Summary collapse

Class Method Details

.plugin_json_reporter_init(options) ⇒ Object



7
8
9
10
11
12
# File 'lib/minitest/json_reporter_plugin.rb', line 7

def self.plugin_json_reporter_init(options)
  if options[:json]
    Minitest.reporter.reporters.clear
    Minitest.reporter << JsonReporter.new(options)
  end
end

.plugin_json_reporter_options(opts, options) ⇒ Object



14
15
16
# File 'lib/minitest/json_reporter_plugin.rb', line 14

def self.plugin_json_reporter_options(opts, options)
  opts.on("--json", "Json dump") { |_json| options[:json] = true }
end