diff --git a/test/rubygems/test_gem_commands_help_command.rb b/test/rubygems/test_gem_commands_help_command.rb index 8d20563a60..b85c6fb10f 100644 --- a/test/rubygems/test_gem_commands_help_command.rb +++ b/test/rubygems/test_gem_commands_help_command.rb @@ -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 diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 0f895e3cf3..42988ad086 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -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) diff --git a/test/rubygems/test_remote_fetch_error.rb b/test/rubygems/test_remote_fetch_error.rb index 29aaaa8adb..6602f8205b 100644 --- a/test/rubygems/test_remote_fetch_error.rb +++ b/test/rubygems/test_remote_fetch_error.rb @@ -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