aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_path_support.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_path_support.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_path_support.rb')
-rw-r--r--test/rubygems/test_gem_path_support.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/rubygems/test_gem_path_support.rb b/test/rubygems/test_gem_path_support.rb
index 394cba2b7f..fa0e3990be 100644
--- a/test/rubygems/test_gem_path_support.rb
+++ b/test/rubygems/test_gem_path_support.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-require_relative 'helper'
-require 'rubygems'
-require 'fileutils'
+require_relative "helper"
+require "rubygems"
+require "fileutils"
class TestGemPathSupport < Gem::TestCase
def setup
@@ -25,7 +25,7 @@ class TestGemPathSupport < Gem::TestCase
assert_equal File.join(@tempdir, "foo"), ps.home
- expected = ENV["GEM_PATH"].split(File::PATH_SEPARATOR) + [File.join(@tempdir, 'foo')]
+ expected = ENV["GEM_PATH"].split(File::PATH_SEPARATOR) + [File.join(@tempdir, "foo")]
assert_equal expected, ps.path
end
@@ -45,8 +45,8 @@ class TestGemPathSupport < Gem::TestCase
assert_equal ENV["GEM_HOME"], ps.home
expected = [
- File.join(@tempdir, 'foo'),
- File.join(@tempdir, 'bar'),
+ File.join(@tempdir, "foo"),
+ File.join(@tempdir, "bar"),
ENV["GEM_HOME"],
]
@@ -65,8 +65,8 @@ class TestGemPathSupport < Gem::TestCase
assert_equal ENV["GEM_HOME"], ps.home
expected = [
- File.join(@tempdir, 'foo'),
- File.join(@tempdir, 'bar'),
+ File.join(@tempdir, "foo"),
+ File.join(@tempdir, "bar"),
] + Gem.default_path << ENV["GEM_HOME"]
assert_equal expected, ps.path
@@ -83,8 +83,8 @@ class TestGemPathSupport < Gem::TestCase
assert_equal ENV["GEM_HOME"], ps.home
expected = [
- File.join(@tempdir, 'foo'),
- File.join(@tempdir, 'bar'),
+ File.join(@tempdir, "foo"),
+ File.join(@tempdir, "bar"),
] + Gem.default_path << ENV["GEM_HOME"]
assert_equal expected, ps.path
@@ -97,7 +97,7 @@ class TestGemPathSupport < Gem::TestCase
assert_equal File.join(@tempdir, "foo"), ps.home
- expected = [File.join(@tempdir, 'foo'), File.join(@tempdir, 'bar')]
+ expected = [File.join(@tempdir, "foo"), File.join(@tempdir, "bar")]
assert_equal expected, ps.path
end
end
@@ -108,12 +108,12 @@ class TestGemPathSupport < Gem::TestCase
ps = Gem::PathSupport.new ENV
assert_equal Gem.default_spec_cache_dir, ps.spec_cache_dir
- ENV["GEM_SPEC_CACHE"] = 'bar'
+ ENV["GEM_SPEC_CACHE"] = "bar"
ps = Gem::PathSupport.new ENV
assert_equal ENV["GEM_SPEC_CACHE"], ps.spec_cache_dir
- ENV["GEM_SPEC_CACHE"] = File.join @tempdir, 'spec_cache'
+ ENV["GEM_SPEC_CACHE"] = File.join @tempdir, "spec_cache"
ps = Gem::PathSupport.new "GEM_SPEC_CACHE" => "foo"
assert_equal "foo", ps.spec_cache_dir
@@ -126,7 +126,7 @@ class TestGemPathSupport < Gem::TestCase
begin
File.symlink(dir, symlink)
rescue NotImplementedError, SystemCallError
- pend 'symlinks not supported'
+ pend "symlinks not supported"
end
not_existing = "#{@tempdir}/does_not_exist"
path = "#{symlink}#{File::PATH_SEPARATOR}#{not_existing}"