about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-06-29 04:28:34 +0000
committerEric Wong <e@80x24.org>2014-06-30 00:47:30 +0000
commitc515132f0c4ae84dd1aa9be5a4630041c198dca8 (patch)
tree7bc726f1e5e6b667c447ecc420e5b83bc645b163 /test
parent34a5c2c0ae02d261191442acc3907f2346bf2f95 (diff)
downloaddtas-c515132f0c4ae84dd1aa9be5a4630041c198dca8.tar.gz
RubyGems is not available on some LTS distros (Ubuntu precise with
Ruby 1.9.3-p0)
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 = []