diff options
author | Takuya Noguchi <takninnovationresearch@gmail.com> | 2022-07-17 08:08:51 +0000 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-07-22 12:07:23 +0900 |
commit | d7ffd3fea402239b16833cc434404a7af82d44f3 (patch) | |
tree | 9794942135111c36e6b6bce69e070ca556b89028 /test/rubygems/test_gem_install_update_options.rb | |
parent | 388c4e1076ac5a58d5008abc8e0a8d017698875a (diff) |
RubyGems: Enable Style/StringLiterals cop
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
Diffstat (limited to 'test/rubygems/test_gem_install_update_options.rb')
-rw-r--r-- | test/rubygems/test_gem_install_update_options.rb | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/rubygems/test_gem_install_update_options.rb b/test/rubygems/test_gem_install_update_options.rb index a499c2be3b..e2225a1eba 100644 --- a/test/rubygems/test_gem_install_update_options.rb +++ b/test/rubygems/test_gem_install_update_options.rb @@ -1,14 +1,14 @@ # frozen_string_literal: true -require_relative 'installer_test_case' -require 'rubygems/install_update_options' -require 'rubygems/command' -require 'rubygems/dependency_installer' +require_relative "installer_test_case" +require "rubygems/install_update_options" +require "rubygems/command" +require "rubygems/dependency_installer" class TestGemInstallUpdateOptions < Gem::InstallerTestCase def setup super - @cmd = Gem::Command.new 'dummy', 'dummy', + @cmd = Gem::Command.new "dummy", "dummy", Gem::DependencyInstaller::DEFAULT_OPTIONS @cmd.extend Gem::InstallUpdateOptions @cmd.add_install_update_options @@ -38,7 +38,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase def test_build_root @cmd.handle_options %w[--build-root build_root] - assert_equal File.expand_path('build_root'), @cmd.options[:build_root] + assert_equal File.expand_path("build_root"), @cmd.options[:build_root] end def test_doc @@ -92,7 +92,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase end def test_security_policy - pend 'openssl is missing' unless Gem::HAVE_OPENSSL + pend "openssl is missing" unless Gem::HAVE_OPENSSL @cmd.handle_options %w[-P HighSecurity] @@ -100,7 +100,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase end def test_security_policy_unknown - pend 'openssl is missing' unless Gem::HAVE_OPENSSL + pend "openssl is missing" unless Gem::HAVE_OPENSSL @cmd.add_install_update_options @@ -111,7 +111,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase end def test_user_install_enabled - @spec = quick_gem 'a' do |spec| + @spec = quick_gem "a" do |spec| util_make_exec spec end @@ -124,12 +124,12 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase @installer = Gem::Installer.at @gem, @cmd.options @installer.install - assert_path_exist File.join(Gem.user_dir, 'gems') - assert_path_exist File.join(Gem.user_dir, 'gems', @spec.full_name) + assert_path_exist File.join(Gem.user_dir, "gems") + assert_path_exist File.join(Gem.user_dir, "gems", @spec.full_name) end def test_user_install_disabled_read_only - @spec = quick_gem 'a' do |spec| + @spec = quick_gem "a" do |spec| util_make_exec spec end @@ -137,9 +137,9 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase @gem = @spec.cache_file if win_platform? - pend('test_user_install_disabled_read_only test skipped on MS Windows') + pend("test_user_install_disabled_read_only test skipped on MS Windows") elsif Process.uid.zero? - pend('test_user_install_disabled_read_only test skipped in root privilege') + pend("test_user_install_disabled_read_only test skipped in root privilege") else @cmd.handle_options %w[--no-user-install] @@ -159,7 +159,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase end def test_vendor - vendordir(File.join(@tempdir, 'vendor')) do + vendordir(File.join(@tempdir, "vendor")) do @cmd.handle_options %w[--vendor] assert @cmd.options[:vendor] @@ -173,7 +173,7 @@ class TestGemInstallUpdateOptions < Gem::InstallerTestCase @cmd.handle_options %w[--vendor] end - assert_equal 'invalid option: --vendor your platform is not supported', + assert_equal "invalid option: --vendor your platform is not supported", e.message refute @cmd.options[:vendor] |