summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_package_old.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_package_old.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_package_old.rb')
-rw-r--r--test/rubygems/test_gem_package_old.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/rubygems/test_gem_package_old.rb b/test/rubygems/test_gem_package_old.rb
index 945340a96a..d65d1edad6 100644
--- a/test/rubygems/test_gem_package_old.rb
+++ b/test/rubygems/test_gem_package_old.rb
@@ -1,19 +1,19 @@
# frozen_string_literal: true
-require_relative 'helper'
+require_relative "helper"
unless Gem.java_platform? # jruby can't require the simple_gem file
- require 'rubygems/simple_gem'
+ require "rubygems/simple_gem"
class TestGemPackageOld < Gem::TestCase
def setup
super
- File.open 'old_format.gem', 'wb' do |io|
+ File.open "old_format.gem", "wb" do |io|
io.write SIMPLE_GEM
end
- @package = Gem::Package::Old.new 'old_format.gem'
- @destination = File.join @tempdir, 'extract'
+ @package = Gem::Package::Old.new "old_format.gem"
+ @destination = File.join @tempdir, "extract"
FileUtils.mkdir_p @destination
end
@@ -23,7 +23,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
end
def test_contents_security_policy
- pend 'openssl is missing' unless Gem::HAVE_OPENSSL
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL
@package.security_policy = Gem::Security::AlmostNoSecurity
@@ -35,7 +35,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
def test_extract_files
@package.extract_files @destination
- extracted = File.join @destination, 'lib/foo.rb'
+ extracted = File.join @destination, "lib/foo.rb"
assert_path_exist extracted
mask = 0100644 & (~File.umask)
@@ -44,7 +44,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
end
def test_extract_files_security_policy
- pend 'openssl is missing' unless Gem::HAVE_OPENSSL
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL
@package.security_policy = Gem::Security::AlmostNoSecurity
@@ -54,11 +54,11 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
end
def test_spec
- assert_equal 'testing', @package.spec.name
+ assert_equal "testing", @package.spec.name
end
def test_spec_security_policy
- pend 'openssl is missing' unless Gem::HAVE_OPENSSL
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL
@package.security_policy = Gem::Security::AlmostNoSecurity
@@ -68,7 +68,7 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
end
def test_verify
- pend 'openssl is missing' unless Gem::HAVE_OPENSSL
+ pend "openssl is missing" unless Gem::HAVE_OPENSSL
assert @package.verify
@@ -82,8 +82,8 @@ unless Gem.java_platform? # jruby can't require the simple_gem file
@package.verify
end
- assert_equal 'old format gems do not contain signatures ' +
- 'and cannot be verified',
+ assert_equal "old format gems do not contain signatures " +
+ "and cannot be verified",
e.message
end
end