about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/helper.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/helper.rb b/test/helper.rb
index b704a2a..1812e99 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -50,14 +50,21 @@ if ENV["COVERAGE"]
   at_exit { __covmerge }
 end
 
-gem 'minitest'
+begin
+  gem 'minitest'
+rescue LoadError
+end
 require 'minitest/autorun'
 require "tempfile"
 
 Testcase = begin
   Minitest::Test
 rescue NameError
-  Minitest::Unit::TestCase
+  begin
+    Minitest::Unit::TestCase # minitest 4
+  rescue
+    MiniTest::Unit::TestCase # minitest 3
+  end
 end
 
 FIFOS = []