File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 raise "bcpkix jar not found" unless jar ; $CLASSPATH << jar
2222end if defined? JRUBY_VERSION
2323
24- # NOTE: RUnit maven plugin (<= 1.0.5) does not handle test-unit well !
25- #begin
26- # gem 'test-unit'
27- #rescue LoadError
28- # puts "gem 'test-unit' not available, will load built-in 'test/unit'"
29- #end
24+ begin
25+ gem 'test-unit'
26+ rescue LoadError
27+ warn "gem 'test-unit' not available, will load built-in 'test/unit'"
28+ end
29+
3030begin
3131 gem 'minitest'
3232 require 'minitest/autorun'
@@ -51,8 +51,10 @@ def self.plugin_output_init(options)
5151 end
5252 end
5353 end
54- rescue LoadError
55- end
54+ rescue LoadError => e
55+ warn "gem 'minitest' failed to load: #{ e . inspect } "
56+ end unless ( Test ::Unit ::AutoRunner . respond_to? ( :setup_option ) ) rescue true # runit rules
57+ # @see https://github.com/torquebox/jruby-maven-plugins/blob/master/runit-maven-plugin/src/main/java/de/saumya/mojo/runit/RunitMavenTestScriptFactory.java
5658
5759if defined? Minitest ::Test
5860 TestCase = Minitest ::Test
@@ -61,6 +63,8 @@ def self.plugin_output_init(options)
6163 TestCase = Test ::Unit ::TestCase
6264end
6365
66+ puts "#{ __FILE__ } using #{ TestCase } " if $VERBOSE || defined? ( REPORT_PATH )
67+
6468TestCase . class_eval do
6569
6670 def setup ; require 'openssl' end
You can’t perform that action at this time.
0 commit comments