summaryrefslogtreecommitdiff
path: root/test/ruby/test_extlibs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_extlibs.rb')
-rw-r--r--test/ruby/test_extlibs.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/ruby/test_extlibs.rb b/test/ruby/test_extlibs.rb
index 46573b821c..5016692abe 100644
--- a/test/ruby/test_extlibs.rb
+++ b/test/ruby/test_extlibs.rb
@@ -1,10 +1,14 @@
+require "envutil"
+
class TestExtLibs < Test::Unit::TestCase
def self.check_existence(ext, add_msg = nil)
add_msg = ". #{add_msg}" if add_msg
- define_method("test_existence_of_#{ext.gsub(%r'/', '_')}") do
- assert_nothing_raised("extension library `#{ext}' is not found#{add_msg}") do
- require ext
- end
+ define_method("test_existence_of_#{ext}") do
+ assert_separately([], <<-"end;", ignore_stderr: true) # do
+ assert_nothing_raised("extension library `#{ext}' is not found#{add_msg}") do
+ require "#{ext}"
+ end
+ end;
end
end
@@ -32,8 +36,8 @@ class TestExtLibs < Test::Unit::TestCase
check_existence "io/nonblock"
check_existence "io/wait"
check_existence "json"
- #check_existence "mathn/complex" # break the world
- #check_existence "mathn/rational" # break the world
+ check_existence "mathn/complex"
+ check_existence "mathn/rational"
check_existence "nkf"
check_existence "objspace"
check_existence "openssl", "this may be false positive, but should assert because rubygems requires this"