Skip to content

Commit 51fdbe5

Browse files
committed
Use Regexp with refute_match
1 parent 229858e commit 51fdbe5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/rubygems/test_gem_commands_help_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_gem_help_commands
4848
if Gem::HAVE_OPENSSL
4949
assert_empty err
5050

51-
refute_match 'No command found for ', out
51+
refute_match %r|No command found for |, out
5252
end
5353
end
5454
end

test/rubygems/test_gem_specification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2619,7 +2619,7 @@ def test_to_ruby_platform
26192619
def test_to_yaml
26202620
yaml_str = @a1.to_yaml
26212621

2622-
refute_match '!!null', yaml_str
2622+
refute_match %r|!!null|, yaml_str
26232623

26242624
same_spec = Gem::Specification.from_yaml(yaml_str)
26252625

test/rubygems/test_remote_fetch_error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class TestRemoteFetchError < Gem::TestCase
55
def test_password_redacted
66
error = Gem::RemoteFetcher::FetchError.new('There was an error fetching', 'https://user:[email protected]')
7-
refute_match 'secret', error.to_s
7+
refute_match %r|secret|, error.to_s
88
end
99

1010
def test_invalid_url

0 commit comments

Comments
 (0)