File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626begin
2727 gem 'minitest'
2828 require 'minitest/autorun'
29+ # NOTE: deal with maven plugin 1.0.10 setting output (gone on minitest 5) :
30+ if Minitest . const_defined? ( :Unit ) && ! defined? ( Minitest ::Unit . output )
31+ Minitest ::Unit . module_eval do
32+ @@report_path = nil
33+ def self . report_path ; @@report_path end
34+ def self . output = ( report_path ) # called by the runit-maven-plugin
35+ Minitest . extensions << 'output' # add a plugin (MiniT calls #plugin_output_init)
36+ @@report_path = report_path
37+ end
38+ end
39+ Minitest . module_eval do
40+ def self . plugin_output_init ( options )
41+ summary = self . reporter . reporters . find { |rr | rr . is_a? ( Minitest ::SummaryReporter ) }
42+ if summary && Minitest ::Unit . report_path
43+ summary = summary . dup
44+ summary . io = Minitest ::Unit . report_path
45+ self . reporter . reporters << summary
46+ end
47+ end
48+ end
49+ end
2950rescue LoadError
3051end
3152
You can’t perform that action at this time.
0 commit comments