From 209ea85b54c9229f0c1e5c730dee05a096599eb0 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 19 Aug 2019 18:37:22 +0900 Subject: Make portable for standalone test-unit gem. * It can invoke test-unit with envutil.rb * refute_match of test-unit couldn't handle String instance. --- test/uri/test_common.rb | 1 + test/uri/test_generic.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'test/uri') diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb index 4a7300fce7..5bec21ca29 100644 --- a/test/uri/test_common.rb +++ b/test/uri/test_common.rb @@ -1,5 +1,6 @@ # frozen_string_literal: false require 'test/unit' +require 'envutil' require 'uri' module URI diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb index c850eb02d1..90f779c88c 100644 --- a/test/uri/test_generic.rb +++ b/test/uri/test_generic.rb @@ -1,5 +1,6 @@ # frozen_string_literal: false require 'test/unit' +require 'envutil' require 'uri' class URI::TestGeneric < Test::Unit::TestCase @@ -765,7 +766,7 @@ class URI::TestGeneric < Test::Unit::TestCase e = assert_raise(URI::InvalidComponentError) do uri.password = password end - refute_match password, e.message + refute_match Regexp.new(password), e.message end def test_set_scheme -- cgit v1.2.3