ruby-changes:50899
From: kazu <ko1@a...>
Date: Sat, 7 Apr 2018 00:06:58 +0900 (JST)
Subject: [ruby-changes:50899] kazu:r63106 (trunk): Use assert_operator instead of assert
kazu 2018-04-07 00:06:52 +0900 (Sat, 07 Apr 2018) New Revision: 63106 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63106 Log: Use assert_operator instead of assert Modified files: trunk/test/webrick/test_httpserver.rb Index: test/webrick/test_httpserver.rb =================================================================== --- test/webrick/test_httpserver.rb (revision 63105) +++ test/webrick/test_httpserver.rb (revision 63106) @@ -436,7 +436,7 @@ class TestWEBrickHTTPServer < Test::Unit https://github.com/ruby/ruby/blob/trunk/test/webrick/test_httpserver.rb#L436 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 https://github.com/ruby/ruby/blob/trunk/test/webrick/test_httpserver.rb#L445 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 https://github.com/ruby/ruby/blob/trunk/test/webrick/test_httpserver.rb#L462 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 }) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/