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:
parent
1289cc2dc3
commit
f7faedc715
@ -436,7 +436,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase
|
|||||||
http.request(req) { |res| assert_equal('404', res.code) }
|
http.request(req) { |res| assert_equal('404', res.code) }
|
||||||
exp = %Q(ERROR `/notexist\\n/foo' not found.\n)
|
exp = %Q(ERROR `/notexist\\n/foo' not found.\n)
|
||||||
assert_equal 1, log_ary.size
|
assert_equal 1, log_ary.size
|
||||||
assert log_ary[0].include?(exp)
|
assert_operator log_ary[0], :include?, exp
|
||||||
ensure
|
ensure
|
||||||
s&.shutdown
|
s&.shutdown
|
||||||
th&.join
|
th&.join
|
||||||
@ -445,7 +445,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase
|
|||||||
def test_gigantic_request_header
|
def test_gigantic_request_header
|
||||||
log_tester = lambda {|log, access_log|
|
log_tester = lambda {|log, access_log|
|
||||||
assert_equal 1, log.size
|
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|
|
TestWEBrick.start_httpserver({}, log_tester){|server, addr, port, log|
|
||||||
server.mount('/', WEBrick::HTTPServlet::FileHandler, __FILE__)
|
server.mount('/', WEBrick::HTTPServlet::FileHandler, __FILE__)
|
||||||
@ -462,7 +462,7 @@ class TestWEBrickHTTPServer < Test::Unit::TestCase
|
|||||||
def test_eof_in_chunk
|
def test_eof_in_chunk
|
||||||
log_tester = lambda do |log, access_log|
|
log_tester = lambda do |log, access_log|
|
||||||
assert_equal 1, log.size
|
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
|
end
|
||||||
TestWEBrick.start_httpserver({}, log_tester){|server, addr, port, log|
|
TestWEBrick.start_httpserver({}, log_tester){|server, addr, port, log|
|
||||||
server.mount_proc('/', ->(req, res) { res.body = req.body })
|
server.mount_proc('/', ->(req, res) { res.body = req.body })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user