ruby-changes:66257
From: Hiroshi <ko1@a...>
Date: Tue, 18 May 2021 17:37:10 +0900 (JST)
Subject: [ruby-changes:66257] 8ab2afb20b (master): Use Test::Unit instead of Minitest::Unit
https://git.ruby-lang.org/ruby.git/commit/?id=8ab2afb20b From 8ab2afb20b000396ef82fb428b9bfdfa0e13d816 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Tue, 18 May 2021 16:48:16 +0900 Subject: Use Test::Unit instead of Minitest::Unit --- tool/test/webrick/test_httpresponse.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tool/test/webrick/test_httpresponse.rb b/tool/test/webrick/test_httpresponse.rb index 89a0f70..4410f63 100644 --- a/tool/test/webrick/test_httpresponse.rb +++ b/tool/test/webrick/test_httpresponse.rb @@ -1,11 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/tool/test/webrick/test_httpresponse.rb#L1 # frozen_string_literal: false require "webrick" -require "minitest/autorun" +require "test/unit" require "stringio" require "net/http" module WEBrick - class TestHTTPResponse < MiniTest::Unit::TestCase + class TestHTTPResponse < Test::Unit::TestCase class FakeLogger attr_reader :messages @@ -94,14 +94,14 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/tool/test/webrick/test_httpresponse.rb#L94 def test_set_redirect_response_splitting url = "malicious\r\nCookie: cracked_indicator_for_test" - assert_raises(URI::InvalidURIError) do + assert_raise(URI::InvalidURIError) do res.set_redirect(WEBrick::HTTPStatus::MultipleChoices, url) end end def test_set_redirect_html_injection url = 'http://example.com////?a</a><head></head><body><img src=1></body>' - assert_raises(WEBrick::HTTPStatus::MultipleChoices) do + assert_raise(WEBrick::HTTPStatus::MultipleChoices) do res.set_redirect(WEBrick::HTTPStatus::MultipleChoices, url) end res.status = 300 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/