diff options
Diffstat (limited to 'test/webrick/utils.rb')
-rw-r--r-- | test/webrick/utils.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/webrick/utils.rb b/test/webrick/utils.rb index ce667df355..92353908be 100644 --- a/test/webrick/utils.rb +++ b/test/webrick/utils.rb @@ -37,12 +37,13 @@ module TestWEBrick log_ary = [] access_log_ary = [] log = proc { "webrick log start:\n" + (log_ary+access_log_ary).join.gsub(/^/, " ").chomp + "\nwebrick log end" } - server = klass.new({ + config = ({ :BindAddress => "127.0.0.1", :Port => 0, :ServerType => Thread, :Logger => WEBrick::Log.new(log_ary, WEBrick::BasicLog::WARN), :AccessLog => [[access_log_ary, ""]] }.update(config)) + server = capture_io {break klass.new(config)} server_thread = server.start server_thread2 = Thread.new { server_thread.join |