summaryrefslogtreecommitdiff
path: root/test/xmlrpc/webrick_testing.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 05:06:44 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-09 05:06:44 +0000
commita4b5982b4c95b0c6779748bf010aa7445714f343 (patch)
treec5b858caaca30d621214278195b61b0f342190ff /test/xmlrpc/webrick_testing.rb
parenta11aa75662f88ead04d340330c81bf243806ad57 (diff)
* 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
Diffstat (limited to 'test/xmlrpc/webrick_testing.rb')
-rw-r--r--test/xmlrpc/webrick_testing.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/xmlrpc/webrick_testing.rb b/test/xmlrpc/webrick_testing.rb
index 464d61dc17b..e2a0c3f1334 100644
--- a/test/xmlrpc/webrick_testing.rb
+++ b/test/xmlrpc/webrick_testing.rb
@@ -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