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

* test/xmlrpc: Test webrick error log is empty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-11-09 05:06:44 +00:00
parent a11aa75662
commit a4b5982b4c
3 changed files with 11 additions and 5 deletions

View file

@ -1,3 +1,7 @@
Sun Nov 9 14:06:13 2014 Tanaka Akira <akr@fsij.org>
* test/xmlrpc: Test webrick error log is empty.
Sun Nov 9 13:47:02 2014 Koichi Sasada <ko1@atdot.net>
* gc.c (is_incremental_marking): use #if/#else because

View file

@ -14,7 +14,7 @@ class Test_Webrick < Test::Unit::TestCase
@@basic_auth = WEBrick::HTTPAuth::BasicAuth.new(
:Realm => 'auth',
:UserDB => WEBrick::HTTPAuth::Htpasswd.new(File.expand_path('./htpasswd', File.dirname(__FILE__))),
:Logger => Logger.new(File::NULL),
:Logger => NoLog,
)
def create_servlet

View file

@ -2,10 +2,12 @@ require 'timeout'
module TestXMLRPC
module WEBrick_Testing
class DummyLog < WEBrick::BasicLog
def initialize() super(self) end
def <<(*args) end
empty_log = Object.new
def empty_log.<<(str)
assert_equal('', str)
self
end
NoLog = WEBrick::Log.new(empty_log, WEBrick::BasicLog::WARN)
def start_server(config={})
raise "already started" if defined?(@__server) && @__server
@ -14,7 +16,7 @@ module WEBrick_Testing
@__server = WEBrick::HTTPServer.new(
{
:BindAddress => "localhost",
:Logger => DummyLog.new,
:Logger => NoLog,
:AccessLog => [],
}.update(config))
yield @__server