aboutsummaryrefslogtreecommitdiffstats
path: root/test/open-uri
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-23 13:48:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-23 13:48:41 +0000
commit77b1d88513cb4aea0183fef256dc2d7f168a2b4b (patch)
treebb03c437b79b8cfff376bb3e33ff05423eb6172f /test/open-uri
parent535a28c73748874eed9016e48515f01a71c507eb (diff)
downloadruby-77b1d88513cb4aea0183fef256dc2d7f168a2b4b.tar.gz
skip OpenSSL dependent tests if not available
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/open-uri')
-rw-r--r--test/open-uri/test_ssl.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb
index 059465d73d..4ba59d567a 100644
--- a/test/open-uri/test_ssl.rb
+++ b/test/open-uri/test_ssl.rb
@@ -1,13 +1,18 @@
require 'test/unit'
require 'open-uri'
-require 'openssl'
require 'stringio'
require 'webrick'
-require 'webrick/https'
+begin
+ require 'openssl'
+ require 'webrick/https'
+rescue LoadError
+end
require 'webrick/httpproxy'
class TestOpenURISSL < Test::Unit::TestCase
+end
+class TestOpenURISSL
NullLog = Object.new
def NullLog.<<(arg)
end
@@ -100,7 +105,7 @@ class TestOpenURISSL < Test::Unit::TestCase
}
end
-end
+end if defined?(OpenSSL)
# mkdir demoCA demoCA/private demoCA/newcerts
# touch demoCA/index.txt