1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Use Regexp with refute_match

https://github.com/rubygems/rubygems/commit/51fdbe53bc
This commit is contained in:
Hiroshi SHIBATA 2020-02-19 15:10:29 +09:00
parent 3c9633acfc
commit 183174475c
Notes: git 2021-05-12 17:25:23 +09:00
3 changed files with 3 additions and 3 deletions

View file

@ -48,7 +48,7 @@ class TestGemCommandsHelpCommand < Gem::TestCase
if Gem::HAVE_OPENSSL
assert_empty err
refute_match 'No command found for ', out
refute_match %r|No command found for |, out
end
end
end

View file

@ -2619,7 +2619,7 @@ end
def test_to_yaml
yaml_str = @a1.to_yaml
refute_match '!!null', yaml_str
refute_match %r|!!null|, yaml_str
same_spec = Gem::Specification.from_yaml(yaml_str)

View file

@ -4,7 +4,7 @@ require 'rubygems/test_case'
class TestRemoteFetchError < Gem::TestCase
def test_password_redacted
error = Gem::RemoteFetcher::FetchError.new('There was an error fetching', 'https://user:secret@gemsource.org')
refute_match 'secret', error.to_s
refute_match %r|secret|, error.to_s
end
def test_invalid_url