aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_commands_environment_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_environment_command.rb
parent388c4e1076ac5a58d5008abc8e0a8d017698875a (diff)
downloadruby-d7ffd3fea402239b16833cc434404a7af82d44f3.tar.gz
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Diffstat (limited to 'test/rubygems/test_gem_commands_environment_command.rb')
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/rubygems/test_gem_commands_environment_command.rb b/test/rubygems/test_gem_commands_environment_command.rb
index eeddb2befe..91ed774cb6 100644
--- a/test/rubygems/test_gem_commands_environment_command.rb
+++ b/test/rubygems/test_gem_commands_environment_command.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require_relative 'helper'
-require 'rubygems/commands/environment_command'
+require_relative "helper"
+require "rubygems/commands/environment_command"
class TestGemCommandsEnvironmentCommand < Gem::TestCase
def setup
@@ -11,9 +11,9 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
def test_execute
orig_sources = Gem.sources.dup
- orig_path, ENV['PATH'] = ENV['PATH'], %w[/usr/local/bin /usr/bin /bin].join(File::PATH_SEPARATOR)
+ orig_path, ENV["PATH"] = ENV["PATH"], %w[/usr/local/bin /usr/bin /bin].join(File::PATH_SEPARATOR)
Gem.sources.replace %w[http://gems.example.com]
- Gem.configuration['gemcutter_key'] = 'blah'
+ Gem.configuration["gemcutter_key"] = "blah"
@cmd.send :handle_options, %w[]
@@ -51,7 +51,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
ensure
Gem.sources.replace orig_sources
- ENV['PATH'] = orig_path
+ ENV["PATH"] = orig_path
end
def test_execute_gemdir
@@ -62,7 +62,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "#{@gemhome}\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
end
def test_execute_user_gemdir
@@ -73,7 +73,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "#{Gem.user_dir}\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
end
def test_execute_user_gemhome
@@ -84,7 +84,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "#{Gem.user_dir}\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
end
def test_execute_gempath
@@ -95,13 +95,13 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "#{@gemhome}\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
end
def test_execute_gempath_multiple
Gem.clear_paths
path = [@gemhome, "#{@gemhome}2"].join File::PATH_SEPARATOR
- ENV['GEM_PATH'] = path
+ ENV["GEM_PATH"] = path
@cmd.send :handle_options, %w[gempath]
@@ -110,7 +110,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "#{Gem.path.join File::PATH_SEPARATOR}\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
end
def test_execute_remotesources
@@ -124,7 +124,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "http://gems.example.com\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
ensure
Gem.sources.replace orig_sources
@@ -139,8 +139,8 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
end
- assert_equal '', @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.output
+ assert_equal "", @ui.error
end
def test_execute_version
@@ -151,7 +151,7 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "#{Gem::VERSION}\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
end
def test_execute_platform
@@ -162,6 +162,6 @@ class TestGemCommandsEnvironmentCommand < Gem::TestCase
end
assert_equal "#{Gem.platforms.join File::PATH_SEPARATOR}\n", @ui.output
- assert_equal '', @ui.error
+ assert_equal "", @ui.error
end
end