aboutsummaryrefslogtreecommitdiffstats
path: root/test/envutil.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-07-22 14:32:15 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-07-22 14:32:15 -0700
commit64b4351ba8de4edb4c43d5195703727a02cce697 (patch)
treeab65fe394211e2b1765d6cd529681838f3f7790b /test/envutil.rb
parent006784895052e030bdcfade658b65f9414594dbc (diff)
downloadruby-openssl-64b4351ba8de4edb4c43d5195703727a02cce697.tar.gz
backfill Minitest::Assertion for use with test/unit
Since the gem uses test/unit that *isn't* based on minitest, the `MiniTest::Assertion` class isn't defined. This commit defines that constant so that the tests will work under both MRI's test suite (that is based on minitest) and the Gem test suite (that uses test/unit).
Diffstat (limited to 'test/envutil.rb')
-rw-r--r--test/envutil.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/envutil.rb b/test/envutil.rb
index c5d45854..6c1929ab 100644
--- a/test/envutil.rb
+++ b/test/envutil.rb
@@ -3,6 +3,12 @@ require "open3"
require "timeout"
require_relative "find_executable"
+unless defined?(MiniTest)
+ module MiniTest
+ Assertion = Test::Unit::AssertionFailedError
+ end
+end
+
module EnvUtil
def rubybin
if ruby = ENV["RUBY"]