summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_commands_help_command.rb
diff options
context:
space:
mode:
authorTakuya Noguchi <takninnovationresearch@gmail.com>2022-07-17 08:08:51 +0000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-07-22 12:07:23 +0900
commitd7ffd3fea402239b16833cc434404a7af82d44f3 (patch)
tree9794942135111c36e6b6bce69e070ca556b89028 /test/rubygems/test_gem_commands_help_command.rb
parent388c4e1076ac5a58d5008abc8e0a8d017698875a (diff)
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Diffstat (limited to 'test/rubygems/test_gem_commands_help_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_help_command.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/rubygems/test_gem_commands_help_command.rb b/test/rubygems/test_gem_commands_help_command.rb
index 98e5b62be0..b84bc4f7ef 100644
--- a/test/rubygems/test_gem_commands_help_command.rb
+++ b/test/rubygems/test_gem_commands_help_command.rb
@@ -11,41 +11,41 @@ class TestGemCommandsHelpCommand < Gem::TestCase
@cmd = Gem::Commands::HelpCommand.new
- load File.expand_path('rubygems_plugin.rb', __dir__) unless Gem::Commands.const_defined? :InterruptCommand
+ load File.expand_path("rubygems_plugin.rb", __dir__) unless Gem::Commands.const_defined? :InterruptCommand
end
def test_gem_help_bad
- util_gem 'bad' do |out, err|
- assert_equal('', out)
+ util_gem "bad" do |out, err|
+ assert_equal("", out)
assert_match "Unknown command bad", err
end
end
def test_gem_help_gem_dependencies
- util_gem 'gem_dependencies' do |out, err|
- assert_match 'gem.deps.rb', out
- assert_equal '', err
+ util_gem "gem_dependencies" do |out, err|
+ assert_match "gem.deps.rb", out
+ assert_equal "", err
end
end
def test_gem_help_platforms
- util_gem 'platforms' do |out, err|
+ util_gem "platforms" do |out, err|
assert_match(/x86-freebsd/, out)
- assert_equal '', err
+ assert_equal "", err
end
end
def test_gem_help_build
- util_gem 'build' do |out, err|
+ util_gem "build" do |out, err|
assert_match(/-C PATH *Run as if gem build was started in <PATH>/, out)
- assert_equal '', err
+ assert_equal "", err
end
end
def test_gem_help_commands
mgr = Gem::CommandManager.new
- util_gem 'commands' do |out, err|
+ util_gem "commands" do |out, err|
mgr.command_names.each do |cmd|
unless mgr[cmd].deprecated?
assert_match(/\s+#{cmd}\s+\S+/, out)
@@ -63,7 +63,7 @@ class TestGemCommandsHelpCommand < Gem::TestCase
def test_gem_help_commands_omits_deprecated_commands
mgr = Gem::CommandManager.new
- util_gem 'commands' do |out, err|
+ util_gem "commands" do |out, err|
deprecated_commands = mgr.command_names.select {|cmd| mgr[cmd].deprecated? }
deprecated_commands.each do |cmd|
refute_match(/\A\s+#{cmd}\s+\S+\z/, out)
@@ -75,7 +75,7 @@ class TestGemCommandsHelpCommand < Gem::TestCase
util_gem do |out, err|
assert_match(/Usage:/, out)
assert_match(/gem install/, out)
- assert_equal '', err
+ assert_equal "", err
end
end