diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-07 03:48:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-07 03:48:44 +0000 |
commit | eaf5e34b70eed584530ddbce0c44b53ae73f1a81 (patch) | |
tree | ce512f9b28c6b484845a536b46dca023464f49c4 /test/webrick/test_httpserver.rb | |
parent | 5506e9b1749688c85d9c8e5a3df04858a67d0692 (diff) | |
download | ruby-eaf5e34b70eed584530ddbce0c44b53ae73f1a81.tar.gz |
Use assert_include
For better failure message:
- by assert_operator: Expected "X" to be include? "Y"
- by assert_include: Expected "X" to include "Y"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick/test_httpserver.rb')
-rw-r--r-- | test/webrick/test_httpserver.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/webrick/test_httpserver.rb b/test/webrick/test_httpserver.rb index 4ba950afd5..77da797282 100644 --- a/test/webrick/test_httpserver.rb +++ b/test/webrick/test_httpserver.rb @@ -436,7 +436,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase http.request(req) { |res| assert_equal('404', res.code) } exp = %Q(ERROR `/notexist\\n/foo' not found.\n) assert_equal 1, log_ary.size - assert_operator log_ary[0], :include?, exp + assert_include log_ary[0], exp ensure s&.shutdown th&.join @@ -445,7 +445,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase def test_gigantic_request_header log_tester = lambda {|log, access_log| assert_equal 1, log.size - assert_operator log[0], :include?, 'ERROR headers too large' + assert_include log[0], 'ERROR headers too large' } TestWEBrick.start_httpserver({}, log_tester){|server, addr, port, log| server.mount('/', WEBrick::HTTPServlet::FileHandler, __FILE__) @@ -462,7 +462,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase def test_eof_in_chunk log_tester = lambda do |log, access_log| assert_equal 1, log.size - assert_operator log[0], :include?, 'ERROR bad chunk data size' + assert_include log[0], 'ERROR bad chunk data size' end TestWEBrick.start_httpserver({}, log_tester){|server, addr, port, log| server.mount_proc('/', ->(req, res) { res.body = req.body }) |