1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

drying up the requires in the openssl tests

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2010-12-15 19:50:00 +00:00
parent 1c93261983
commit 033cea7d8e
17 changed files with 20 additions and 94 deletions

View file

@ -1,5 +1,4 @@
require_relative 'utils' require_relative 'utils'
require "digest/md5"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,7 +1,4 @@
require 'openssl' require_relative 'utils'
require "test/unit"
require 'tempfile'
require File.join(File.dirname(__FILE__), "utils.rb")
class OpenSSL::TestConfig < Test::Unit::TestCase class OpenSSL::TestConfig < Test::Unit::TestCase
def setup def setup

View file

@ -1,9 +1,4 @@
begin require_relative 'utils'
require "openssl"
rescue LoadError
end
require "digest/md5"
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative 'utils'
require "openssl"
require File.join(File.dirname(__FILE__), "utils.rb")
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL::PKey::EC) if defined?(OpenSSL::PKey::EC)

View file

@ -1,8 +1,4 @@
begin require_relative 'utils'
require "openssl"
rescue LoadError
end
require "test/unit"
class OpenSSL::TestHMAC < Test::Unit::TestCase class OpenSSL::TestHMAC < Test::Unit::TestCase
def setup def setup

View file

@ -1,13 +1,7 @@
begin require_relative 'utils'
require "openssl"
require_relative 'utils'
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)
class OpenSSL::TestNSSPI < Test::Unit::TestCase class OpenSSL::TestNSSPI < Test::Unit::TestCase
def setup def setup
# This request data is adopt from the specification of # This request data is adopt from the specification of
@ -20,9 +14,6 @@ class OpenSSL::TestNSSPI < Test::Unit::TestCase
@b64 << "i0//rgBvmco=" @b64 << "i0//rgBvmco="
end end
def teardown
end
def test_build_data def test_build_data
key1 = OpenSSL::TestUtils::TEST_KEY_RSA1024 key1 = OpenSSL::TestUtils::TEST_KEY_RSA1024
key2 = OpenSSL::TestUtils::TEST_KEY_RSA2048 key2 = OpenSSL::TestUtils::TEST_KEY_RSA2048

View file

@ -1,9 +1,4 @@
begin require_relative "utils"
require "openssl"
require_relative "utils"
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative 'utils'
require "openssl"
require_relative 'utils'
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative 'utils'
require "openssl"
require File.join(File.dirname(__FILE__), "utils.rb")
rescue LoadError
end
require 'test/unit'
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,12 +1,4 @@
begin require_relative "utils"
require "openssl"
require_relative "utils.rb"
rescue LoadError
end
require "rbconfig"
require "socket"
require "test/unit"
require_relative '../ruby/envutil'
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative "utils"
require "openssl"
require_relative "utils"
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative "utils"
require "openssl"
require_relative "utils"
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative 'utils'
require "openssl"
require File.join(File.dirname(__FILE__), "utils.rb")
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,8 +1,4 @@
begin require_relative 'utils'
require "openssl"
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative "utils"
require "openssl"
require_relative "utils"
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -1,9 +1,4 @@
begin require_relative "utils"
require "openssl"
require_relative "utils"
rescue LoadError
end
require "test/unit"
if defined?(OpenSSL) if defined?(OpenSSL)

View file

@ -3,6 +3,11 @@ begin
rescue LoadError rescue LoadError
end end
require "test/unit" require "test/unit"
require "digest/md5"
require 'tempfile'
require "rbconfig"
require "socket"
require_relative '../ruby/envutil'
module OpenSSL::TestUtils module OpenSSL::TestUtils
TEST_KEY_RSA1024 = OpenSSL::PKey::RSA.new <<-_end_of_pem_ TEST_KEY_RSA1024 = OpenSSL::PKey::RSA.new <<-_end_of_pem_