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

Use assert_operator instead of assert

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2018-04-06 15:06:52 +00:00
parent 1289cc2dc3
commit f7faedc715

View file

@ -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 log_ary[0].include?(exp)
assert_operator log_ary[0], :include?, 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 log[0].include?('ERROR headers too large')
assert_operator log[0], :include?, '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 log[0].include?('ERROR bad chunk data size')
assert_operator log[0], :include?, 'ERROR bad chunk data size'
end
TestWEBrick.start_httpserver({}, log_tester){|server, addr, port, log|
server.mount_proc('/', ->(req, res) { res.body = req.body })