Skip to content

Commit

Permalink
Use Regexp with refute_match
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed May 11, 2021
1 parent 229858e commit 51fdbe5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/rubygems/test_gem_commands_help_command.rb
Expand Up @@ -48,7 +48,7 @@ def test_gem_help_commands
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
Expand Down
2 changes: 1 addition & 1 deletion test/rubygems/test_gem_specification.rb
Expand Up @@ -2619,7 +2619,7 @@ def test_to_ruby_platform
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)

Expand Down
2 changes: 1 addition & 1 deletion test/rubygems/test_remote_fetch_error.rb
Expand Up @@ -4,7 +4,7 @@
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
Expand Down

0 comments on commit 51fdbe5

Please sign in to comment.