Module: Minitest
- Defined in:
- lib/minitest/failure_reporter_plugin.rb,
lib/minitest/failure_reporter/version.rb,
lib/minitest/failure_reporter_reporter.rb
Defined Under Namespace
Modules: FailureReporter
Class Method Summary collapse
- .plugin_failure_reporter_init(options) ⇒ Object
- .plugin_failure_reporter_options(opts, options) ⇒ Object
Class Method Details
.plugin_failure_reporter_init(options) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/minitest/failure_reporter_plugin.rb', line 15 def self.plugin_failure_reporter_init() return unless .delete :failure_reporter file_klass = .delete(:file_klass) || File filename = .delete(:failure_reporter_filename) || 'failure_file.json' io = file_klass.new(filename, 'w') reporter << FailureReporter::Reporter.new(io, ) end |
.plugin_failure_reporter_options(opts, options) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/minitest/failure_reporter_plugin.rb', line 5 def self.(opts, ) opts.on '--failure-reporter', 'Generate a failure json report' do [:failure_reporter] = true end opts.on '--failure-reporter-filename=OUT', 'Target output filename.'\ ' Defaults to failure_file.json' do |out| [:failure_reporter_filename] = out end end |