diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 11:51:06 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-09 11:51:06 +0000 |
commit | 070c310e87d04865da1b4f217432e22cfae5e380 (patch) | |
tree | d11d9ef6c67b447bc886182b9c02e38aa70a3a00 /test/webrick/test_server.rb | |
parent | 9b559f194c9960e66011b8f40d428fe36cb302be (diff) |
* test/webrick: Store log in an array.
* test/net/http: Ditto.
* test/open-uri: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick/test_server.rb')
-rw-r--r-- | test/webrick/test_server.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/webrick/test_server.rb b/test/webrick/test_server.rb index 40afdb050e..e46494a132 100644 --- a/test/webrick/test_server.rb +++ b/test/webrick/test_server.rb @@ -26,7 +26,7 @@ class TestWEBrickServer < Test::Unit::TestCase def test_start_exception stopped = 0 - log = StringIO.new('') + log = [] logger = WEBrick::Log.new(log, WEBrick::BasicLog::WARN) assert_raises(SignalException) do @@ -47,7 +47,8 @@ class TestWEBrickServer < Test::Unit::TestCase end assert_equal(stopped, 1) - assert_match(/FATAL SignalException: SIGTERM/, log.string) + assert_equal(1, log.length) + assert_match(/FATAL SignalException: SIGTERM/, log[0]) end def test_callbacks |