mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Imported minitest 3.0.0 (r7435) w/ fixes for rubygems. 10955 tests, 2253343 assertions, 1 failures, 1 errors, 28 skips minus drb tests on x86_64-darwin11.3.0 and reviewed by drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2dece928e0
commit
a213c2ed9c
9 changed files with 184 additions and 67 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Wed May 9 08:09:38 2012 Ryan Davis <ryand-ruby@zenspider.com>
|
||||||
|
|
||||||
|
* lib/minitest/*: Imported minitest 3.0.0 (r7435)
|
||||||
|
* test/minitest/*: ditto
|
||||||
|
* test/rubygems/*: Imported fixes for buggy use of assert_match
|
||||||
|
and deprecated assert_block
|
||||||
|
UNBUNCH YOUR PANTIES. THE TESTS DO NOT RUN CLEAN ON OSX.
|
||||||
|
|
||||||
Wed May 9 06:28:59 2012 Eric Hodel <drbrain@segment7.net>
|
Wed May 9 06:28:59 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* re.c (rb_reg_equal): Removed incorrect example for Regexp#== with
|
* re.c (rb_reg_equal): Removed incorrect example for Regexp#== with
|
||||||
|
|
|
@ -33,8 +33,8 @@ algorithms in a repeatable manner. Now you can assert that your newb
|
||||||
co-worker doesn't replace your linear algorithm with an exponential
|
co-worker doesn't replace your linear algorithm with an exponential
|
||||||
one!
|
one!
|
||||||
|
|
||||||
minitest/mock by Steven Baker, is a beautifully tiny mock object
|
minitest/mock by Steven Baker, is a beautifully tiny mock (and stub)
|
||||||
framework.
|
object framework.
|
||||||
|
|
||||||
minitest/pride shows pride in testing and adds coloring to your test
|
minitest/pride shows pride in testing and adds coloring to your test
|
||||||
output. I guess it is an example of how to write IO pipes too. :P
|
output. I guess it is an example of how to write IO pipes too. :P
|
||||||
|
@ -54,7 +54,7 @@ discovery.
|
||||||
* minitest/autorun - the easy and explicit way to run all your tests.
|
* minitest/autorun - the easy and explicit way to run all your tests.
|
||||||
* minitest/unit - a very fast, simple, and clean test system.
|
* minitest/unit - a very fast, simple, and clean test system.
|
||||||
* minitest/spec - a very fast, simple, and clean spec system.
|
* minitest/spec - a very fast, simple, and clean spec system.
|
||||||
* minitest/mock - a simple and clean mock system.
|
* minitest/mock - a simple and clean mock/stub system.
|
||||||
* minitest/benchmark - an awesome way to assert your algorithm's performance.
|
* minitest/benchmark - an awesome way to assert your algorithm's performance.
|
||||||
* minitest/pride - show your pride in testing!
|
* minitest/pride - show your pride in testing!
|
||||||
* Incredibly small and fast runner, but no bells and whistles.
|
* Incredibly small and fast runner, but no bells and whistles.
|
||||||
|
@ -194,6 +194,18 @@ Output is tab-delimited to make it easy to paste into a spreadsheet.
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
=== Stubs
|
||||||
|
|
||||||
|
def test_stale_eh
|
||||||
|
obj_under_test = Something.new
|
||||||
|
|
||||||
|
refute obj_under_test.stale?
|
||||||
|
|
||||||
|
Time.stub :now, Time.at(0) do # stub goes away once the block is done
|
||||||
|
assert obj_under_test.stale?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
=== Customizable Test Runner Types:
|
=== Customizable Test Runner Types:
|
||||||
|
|
||||||
MiniTest::Unit.runner=(runner) provides an easy way of creating custom
|
MiniTest::Unit.runner=(runner) provides an easy way of creating custom
|
||||||
|
|
|
@ -132,3 +132,41 @@ module MiniTest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class Object # :nodoc:
|
||||||
|
|
||||||
|
##
|
||||||
|
# Add a temporary stubbed method replacing +name+ for the duration
|
||||||
|
# of the +block+. If +val_or_callable+ responds to #call, then it
|
||||||
|
# returns the result of calling it, otherwise returns the value
|
||||||
|
# as-is. Cleans up the stub at the end of the +block+.
|
||||||
|
#
|
||||||
|
# def test_stale_eh
|
||||||
|
# obj_under_test = Something.new
|
||||||
|
# refute obj_under_test.stale?
|
||||||
|
#
|
||||||
|
# Time.stub :now, Time.at(0) do
|
||||||
|
# assert obj_under_test.stale?
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
|
||||||
|
def stub name, val_or_callable, &block
|
||||||
|
new_name = "__minitest_stub__#{name}"
|
||||||
|
|
||||||
|
metaclass = class << self; self; end
|
||||||
|
metaclass.send :alias_method, new_name, name
|
||||||
|
metaclass.send :define_method, name do |*args|
|
||||||
|
if val_or_callable.respond_to? :call then
|
||||||
|
val_or_callable.call(*args)
|
||||||
|
else
|
||||||
|
val_or_callable
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
yield
|
||||||
|
ensure
|
||||||
|
metaclass.send :undef_method, name
|
||||||
|
metaclass.send :alias_method, name, new_name
|
||||||
|
metaclass.send :undef_method, new_name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -193,7 +193,7 @@ module MiniTest
|
||||||
# Fails unless the block returns a true value.
|
# Fails unless the block returns a true value.
|
||||||
|
|
||||||
def assert_block msg = nil
|
def assert_block msg = nil
|
||||||
warn "NOTE: MiniTest::Unit::TestCase#assert_block is deprecated, use assert. It will be removed on or after 2012-06-01."
|
warn "NOTE: MiniTest::Unit::TestCase#assert_block is deprecated, use assert. It will be removed on or after 2012-06-01. Called from #{caller.first}"
|
||||||
msg = message(msg) { "Expected block to return true value" }
|
msg = message(msg) { "Expected block to return true value" }
|
||||||
assert yield, msg
|
assert yield, msg
|
||||||
end
|
end
|
||||||
|
@ -281,8 +281,8 @@ module MiniTest
|
||||||
|
|
||||||
def assert_match matcher, obj, msg = nil
|
def assert_match matcher, obj, msg = nil
|
||||||
msg = message(msg) { "Expected #{mu_pp matcher} to match #{mu_pp obj}" }
|
msg = message(msg) { "Expected #{mu_pp matcher} to match #{mu_pp obj}" }
|
||||||
assert_respond_to obj, :"=~"
|
assert_respond_to matcher, :"=~"
|
||||||
matcher = Regexp.new Regexp.escape matcher if String === matcher and obj.respond_to?(:to_str)
|
matcher = Regexp.new Regexp.escape matcher if String === matcher
|
||||||
assert matcher =~ obj, msg
|
assert matcher =~ obj, msg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -582,8 +582,8 @@ module MiniTest
|
||||||
|
|
||||||
def refute_match matcher, obj, msg = nil
|
def refute_match matcher, obj, msg = nil
|
||||||
msg = message(msg) {"Expected #{mu_pp matcher} to not match #{mu_pp obj}"}
|
msg = message(msg) {"Expected #{mu_pp matcher} to not match #{mu_pp obj}"}
|
||||||
assert_respond_to obj, :"=~"
|
assert_respond_to matcher, :"=~"
|
||||||
matcher = Regexp.new Regexp.escape matcher if String === matcher and obj.respond_to?(:to_str)
|
matcher = Regexp.new Regexp.escape matcher if String === matcher
|
||||||
refute matcher =~ obj, msg
|
refute matcher =~ obj, msg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -652,7 +652,7 @@ module MiniTest
|
||||||
end
|
end
|
||||||
|
|
||||||
class Unit # :nodoc:
|
class Unit # :nodoc:
|
||||||
VERSION = "2.12.1" # :nodoc:
|
VERSION = "3.0.0" # :nodoc:
|
||||||
|
|
||||||
attr_accessor :report, :failures, :errors, :skips # :nodoc:
|
attr_accessor :report, :failures, :errors, :skips # :nodoc:
|
||||||
attr_accessor :test_count, :assertion_count # :nodoc:
|
attr_accessor :test_count, :assertion_count # :nodoc:
|
||||||
|
|
|
@ -26,13 +26,15 @@ class MetaMetaMetaTestCase < MiniTest::Unit::TestCase
|
||||||
output = @output.string.dup
|
output = @output.string.dup
|
||||||
output.sub!(/Finished tests in .*/, "Finished tests in 0.00")
|
output.sub!(/Finished tests in .*/, "Finished tests in 0.00")
|
||||||
output.sub!(/Loaded suite .*/, 'Loaded suite blah')
|
output.sub!(/Loaded suite .*/, 'Loaded suite blah')
|
||||||
if /mswin|mingw/ =~ RUBY_PLATFORM
|
|
||||||
|
if windows? then
|
||||||
output.gsub!(/\[(?:[A-Za-z]:)?[^\]:]+:\d+\]/, '[FILE:LINE]')
|
output.gsub!(/\[(?:[A-Za-z]:)?[^\]:]+:\d+\]/, '[FILE:LINE]')
|
||||||
output.gsub!(/^(\s+)(?:[A-Za-z]:)?[^:]+:\d+:in/, '\1FILE:LINE:in')
|
output.gsub!(/^(\s+)(?:[A-Za-z]:)?[^:]+:\d+:in/, '\1FILE:LINE:in')
|
||||||
else
|
else
|
||||||
output.gsub!(/\[[^\]:]+:\d+\]/, '[FILE:LINE]')
|
output.gsub!(/\[[^\]:]+:\d+\]/, '[FILE:LINE]')
|
||||||
output.gsub!(/^(\s+)[^:]+:\d+:in/, '\1FILE:LINE:in')
|
output.gsub!(/^(\s+)[^:]+:\d+:in/, '\1FILE:LINE:in')
|
||||||
end
|
end
|
||||||
|
|
||||||
assert_equal(expected, output)
|
assert_equal(expected, output)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -210,3 +210,62 @@ class TestMiniTestMock < MiniTest::Unit::TestCase
|
||||||
assert_equal exp, e.message
|
assert_equal exp, e.message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require "test/minitest/metametameta"
|
||||||
|
|
||||||
|
class TestMiniTestStub < MiniTest::Unit::TestCase
|
||||||
|
def setup
|
||||||
|
super
|
||||||
|
MiniTest::Unit::TestCase.reset
|
||||||
|
|
||||||
|
@tc = MiniTest::Unit::TestCase.new 'fake tc'
|
||||||
|
@assertion_count = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
def teardown
|
||||||
|
super
|
||||||
|
assert_equal @assertion_count, @tc._assertions
|
||||||
|
end
|
||||||
|
|
||||||
|
def assert_stub val_or_callable
|
||||||
|
@assertion_count += 1
|
||||||
|
|
||||||
|
t = Time.now.to_i
|
||||||
|
|
||||||
|
Time.stub :now, val_or_callable do
|
||||||
|
@tc.assert_equal 42, Time.now
|
||||||
|
end
|
||||||
|
|
||||||
|
@tc.assert_operator Time.now.to_i, :>=, t
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_stub_value
|
||||||
|
assert_stub 42
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_stub_block
|
||||||
|
assert_stub lambda { 42 }
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_stub_block_args
|
||||||
|
@assertion_count += 1
|
||||||
|
|
||||||
|
t = Time.now.to_i
|
||||||
|
|
||||||
|
Time.stub :now, lambda { |n| n * 2 } do
|
||||||
|
@tc.assert_equal 42, Time.now(21)
|
||||||
|
end
|
||||||
|
|
||||||
|
@tc.assert_operator Time.now.to_i, :>=, t
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_stub_callable
|
||||||
|
obj = Object.new
|
||||||
|
|
||||||
|
def obj.call
|
||||||
|
42
|
||||||
|
end
|
||||||
|
|
||||||
|
assert_stub obj
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
require 'pathname'
|
require 'pathname'
|
||||||
require File.expand_path('../metametameta', __FILE__)
|
require 'test/minitest/metametameta'
|
||||||
|
|
||||||
module MyModule; end
|
module MyModule; end
|
||||||
class AnError < StandardError; include MyModule; end
|
class AnError < StandardError; include MyModule; end
|
||||||
|
@ -706,13 +706,16 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
|
||||||
|
|
||||||
def test_assert_block
|
def test_assert_block
|
||||||
exp = ["NOTE: MiniTest::Unit::TestCase#assert_block is deprecated,",
|
exp = ["NOTE: MiniTest::Unit::TestCase#assert_block is deprecated,",
|
||||||
"use assert. It will be removed on or after 2012-06-01.\n"].join " "
|
"use assert. It will be removed on or after 2012-06-01."].join " "
|
||||||
|
|
||||||
assert_output "", exp do
|
out, err = capture_io do
|
||||||
@tc.assert_block do
|
@tc.assert_block do
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
assert_equal "", out
|
||||||
|
assert_match exp, err
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assert_block_triggered
|
def test_assert_block_triggered
|
||||||
|
@ -952,15 +955,6 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase
|
||||||
@tc.assert_match "blah", obj
|
@tc.assert_match "blah", obj
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_assert_match_matchee_match
|
|
||||||
@assertion_count = 2
|
|
||||||
|
|
||||||
obj = Object.new
|
|
||||||
def obj.=~(o); true end
|
|
||||||
|
|
||||||
@tc.assert_match "blah", obj
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_assert_match_object_triggered
|
def test_assert_match_object_triggered
|
||||||
@assertion_count = 2
|
@assertion_count = 2
|
||||||
|
|
||||||
|
|
|
@ -207,64 +207,71 @@ class TestGemPlatform < Gem::TestCase
|
||||||
def test_equals_tilde
|
def test_equals_tilde
|
||||||
util_set_arch 'i386-mswin32'
|
util_set_arch 'i386-mswin32'
|
||||||
|
|
||||||
assert_match 'mswin32', Gem::Platform.local
|
assert_local_match 'mswin32'
|
||||||
assert_match 'i386-mswin32', Gem::Platform.local
|
assert_local_match 'i386-mswin32'
|
||||||
|
|
||||||
# oddballs
|
# oddballs
|
||||||
assert_match 'i386-mswin32-mq5.3', Gem::Platform.local
|
assert_local_match 'i386-mswin32-mq5.3'
|
||||||
assert_match 'i386-mswin32-mq6', Gem::Platform.local
|
assert_local_match 'i386-mswin32-mq6'
|
||||||
refute_match 'win32-1.8.2-VC7', Gem::Platform.local
|
refute_local_match 'win32-1.8.2-VC7'
|
||||||
refute_match 'win32-1.8.4-VC6', Gem::Platform.local
|
refute_local_match 'win32-1.8.4-VC6'
|
||||||
refute_match 'win32-source', Gem::Platform.local
|
refute_local_match 'win32-source'
|
||||||
refute_match 'windows', Gem::Platform.local
|
refute_local_match 'windows'
|
||||||
|
|
||||||
util_set_arch 'i686-linux'
|
util_set_arch 'i686-linux'
|
||||||
assert_match 'i486-linux', Gem::Platform.local
|
assert_local_match 'i486-linux'
|
||||||
assert_match 'i586-linux', Gem::Platform.local
|
assert_local_match 'i586-linux'
|
||||||
assert_match 'i686-linux', Gem::Platform.local
|
assert_local_match 'i686-linux'
|
||||||
|
|
||||||
util_set_arch 'i686-darwin8'
|
util_set_arch 'i686-darwin8'
|
||||||
assert_match 'i686-darwin8.4.1', Gem::Platform.local
|
assert_local_match 'i686-darwin8.4.1'
|
||||||
assert_match 'i686-darwin8.8.2', Gem::Platform.local
|
assert_local_match 'i686-darwin8.8.2'
|
||||||
|
|
||||||
util_set_arch 'java'
|
util_set_arch 'java'
|
||||||
assert_match 'java', Gem::Platform.local
|
assert_local_match 'java'
|
||||||
assert_match 'jruby', Gem::Platform.local
|
assert_local_match 'jruby'
|
||||||
|
|
||||||
util_set_arch 'universal-dotnet2.0'
|
util_set_arch 'universal-dotnet2.0'
|
||||||
assert_match 'universal-dotnet', Gem::Platform.local
|
assert_local_match 'universal-dotnet'
|
||||||
assert_match 'universal-dotnet-2.0', Gem::Platform.local
|
assert_local_match 'universal-dotnet-2.0'
|
||||||
refute_match 'universal-dotnet-4.0', Gem::Platform.local
|
refute_local_match 'universal-dotnet-4.0'
|
||||||
assert_match 'dotnet', Gem::Platform.local
|
assert_local_match 'dotnet'
|
||||||
assert_match 'dotnet-2.0', Gem::Platform.local
|
assert_local_match 'dotnet-2.0'
|
||||||
refute_match 'dotnet-4.0', Gem::Platform.local
|
refute_local_match 'dotnet-4.0'
|
||||||
|
|
||||||
util_set_arch 'universal-dotnet4.0'
|
util_set_arch 'universal-dotnet4.0'
|
||||||
assert_match 'universal-dotnet', Gem::Platform.local
|
assert_local_match 'universal-dotnet'
|
||||||
refute_match 'universal-dotnet-2.0', Gem::Platform.local
|
refute_local_match 'universal-dotnet-2.0'
|
||||||
assert_match 'universal-dotnet-4.0', Gem::Platform.local
|
assert_local_match 'universal-dotnet-4.0'
|
||||||
assert_match 'dotnet', Gem::Platform.local
|
assert_local_match 'dotnet'
|
||||||
refute_match 'dotnet-2.0', Gem::Platform.local
|
refute_local_match 'dotnet-2.0'
|
||||||
assert_match 'dotnet-4.0', Gem::Platform.local
|
assert_local_match 'dotnet-4.0'
|
||||||
|
|
||||||
util_set_arch 'universal-macruby-1.0'
|
util_set_arch 'universal-macruby-1.0'
|
||||||
assert_match 'universal-macruby', Gem::Platform.local
|
assert_local_match 'universal-macruby'
|
||||||
assert_match 'macruby', Gem::Platform.local
|
assert_local_match 'macruby'
|
||||||
refute_match 'universal-macruby-0.10', Gem::Platform.local
|
refute_local_match 'universal-macruby-0.10'
|
||||||
assert_match 'universal-macruby-1.0', Gem::Platform.local
|
assert_local_match 'universal-macruby-1.0'
|
||||||
|
|
||||||
util_set_arch 'powerpc-darwin'
|
util_set_arch 'powerpc-darwin'
|
||||||
assert_match 'powerpc-darwin', Gem::Platform.local
|
assert_local_match 'powerpc-darwin'
|
||||||
|
|
||||||
util_set_arch 'powerpc-darwin7'
|
util_set_arch 'powerpc-darwin7'
|
||||||
assert_match 'powerpc-darwin7.9.0', Gem::Platform.local
|
assert_local_match 'powerpc-darwin7.9.0'
|
||||||
|
|
||||||
util_set_arch 'powerpc-darwin8'
|
util_set_arch 'powerpc-darwin8'
|
||||||
assert_match 'powerpc-darwin8.10.0', Gem::Platform.local
|
assert_local_match 'powerpc-darwin8.10.0'
|
||||||
|
|
||||||
util_set_arch 'sparc-solaris2.8'
|
util_set_arch 'sparc-solaris2.8'
|
||||||
assert_match 'sparc-solaris2.8-mq5.3', Gem::Platform.local
|
assert_local_match 'sparc-solaris2.8-mq5.3'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def assert_local_match name
|
||||||
|
assert_match Gem::Platform.local, name
|
||||||
|
end
|
||||||
|
|
||||||
|
def refute_local_match name
|
||||||
|
refute_match Gem::Platform.local, name
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
require 'rubygems/test_case'
|
require 'rubygems/test_case'
|
||||||
require 'ostruct'
|
require 'ostruct'
|
||||||
require 'webrick'
|
require 'webrick'
|
||||||
begin
|
require 'webrick/https'
|
||||||
require 'webrick/https'
|
|
||||||
rescue LoadError
|
|
||||||
end
|
|
||||||
require 'rubygems/remote_fetcher'
|
require 'rubygems/remote_fetcher'
|
||||||
require 'rubygems/format'
|
require 'rubygems/format'
|
||||||
|
|
||||||
|
@ -752,7 +749,7 @@ gems:
|
||||||
with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
|
with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher|
|
||||||
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
|
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
|
||||||
end
|
end
|
||||||
end if defined?(OpenSSL::PKey)
|
end
|
||||||
|
|
||||||
def test_do_not_allow_insecure_ssl_connection_by_default
|
def test_do_not_allow_insecure_ssl_connection_by_default
|
||||||
ssl_server = self.class.start_ssl_server
|
ssl_server = self.class.start_ssl_server
|
||||||
|
@ -761,14 +758,14 @@ gems:
|
||||||
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
|
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end if defined?(OpenSSL::PKey)
|
end
|
||||||
|
|
||||||
def test_ssl_connection_allow_verify_none
|
def test_ssl_connection_allow_verify_none
|
||||||
ssl_server = self.class.start_ssl_server
|
ssl_server = self.class.start_ssl_server
|
||||||
with_configured_fetcher(":ssl_verify_mode: 0") do |fetcher|
|
with_configured_fetcher(":ssl_verify_mode: 0") do |fetcher|
|
||||||
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
|
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/yaml")
|
||||||
end
|
end
|
||||||
end if defined?(OpenSSL::PKey)
|
end
|
||||||
|
|
||||||
def test_do_not_follow_insecure_redirect
|
def test_do_not_follow_insecure_redirect
|
||||||
ssl_server = self.class.start_ssl_server
|
ssl_server = self.class.start_ssl_server
|
||||||
|
@ -778,7 +775,7 @@ gems:
|
||||||
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/insecure_redirect?to=#{@server_uri}")
|
fetcher.fetch_path("https://localhost:#{ssl_server.config[:Port]}/insecure_redirect?to=#{@server_uri}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end if defined?(OpenSSL::PKey)
|
end
|
||||||
|
|
||||||
def with_configured_fetcher(config_str = nil, &block)
|
def with_configured_fetcher(config_str = nil, &block)
|
||||||
if config_str
|
if config_str
|
||||||
|
@ -856,7 +853,7 @@ gems:
|
||||||
end
|
end
|
||||||
|
|
||||||
DIR = File.expand_path(File.dirname(__FILE__))
|
DIR = File.expand_path(File.dirname(__FILE__))
|
||||||
DH_PARAM = defined?(OpenSSL::PKey) ? OpenSSL::PKey::DH.new(128) : nil
|
DH_PARAM = OpenSSL::PKey::DH.new(128)
|
||||||
|
|
||||||
def start_ssl_server(config = {})
|
def start_ssl_server(config = {})
|
||||||
null_logger = NilLog.new
|
null_logger = NilLog.new
|
||||||
|
@ -894,7 +891,7 @@ gems:
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
server
|
server
|
||||||
end if DH_PARAM
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue