File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 21
21
raise "bcpkix jar not found" unless jar ; $CLASSPATH << jar
22
22
end if defined? JRUBY_VERSION
23
23
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
+
30
30
begin
31
31
gem 'minitest'
32
32
require 'minitest/autorun'
@@ -51,8 +51,10 @@ def self.plugin_output_init(options)
51
51
end
52
52
end
53
53
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
56
58
57
59
if defined? Minitest ::Test
58
60
TestCase = Minitest ::Test
@@ -61,6 +63,8 @@ def self.plugin_output_init(options)
61
63
TestCase = Test ::Unit ::TestCase
62
64
end
63
65
66
+ puts "#{ __FILE__ } using #{ TestCase } " if $VERBOSE || defined? ( REPORT_PATH )
67
+
64
68
TestCase . class_eval do
65
69
66
70
def setup ; require 'openssl' end
You can’t perform that action at this time.
0 commit comments