summaryrefslogtreecommitdiff
path: root/test/uri
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-19 18:37:22 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-19 18:37:22 +0900
commit209ea85b54c9229f0c1e5c730dee05a096599eb0 (patch)
tree7ac621d23e7d11f7c0abae28d3342c73eb0e5190 /test/uri
parent9b330200f8e180ca393cac25f811f6194990aaa4 (diff)
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.
Diffstat (limited to 'test/uri')
-rw-r--r--test/uri/test_common.rb1
-rw-r--r--test/uri/test_generic.rb3
2 files changed, 3 insertions, 1 deletions
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