Skip to content

Commit

Permalink
Remove no longer needed RUBYGEMS_TEST_PATH env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed May 26, 2021
1 parent 8dfe1e3 commit 0efb894
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/rubygems/test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ class Gem::TestCase < Test::Unit::TestCase

attr_accessor :uri # :nodoc:

TEST_PATH = ENV.fetch('RUBYGEMS_TEST_PATH', File.expand_path('../../../test/rubygems', __FILE__))

def assert_activate(expected, *specs)
specs.each do |spec|
case spec
Expand Down Expand Up @@ -1326,8 +1324,8 @@ def escape_path(*path)
end
end

@@good_rake = "#{rubybin} #{escape_path(TEST_PATH, 'good_rake.rb')}"
@@bad_rake = "#{rubybin} #{escape_path(TEST_PATH, 'bad_rake.rb')}"
@@good_rake = "#{rubybin} #{escape_path(__dir__, 'good_rake.rb')}"
@@bad_rake = "#{rubybin} #{escape_path(__dir__, 'bad_rake.rb')}"

##
# Construct a new Gem::Dependency.
Expand Down Expand Up @@ -1514,12 +1512,12 @@ def self.load_cert(cert_name)

def self.cert_path(cert_name)
if 32 == (Time.at(2**32) rescue 32)
cert_file = "#{TEST_PATH}/#{cert_name}_cert_32.pem"
cert_file = "#{__dir__}/#{cert_name}_cert_32.pem"

return cert_file if File.exist? cert_file
end

"#{TEST_PATH}/#{cert_name}_cert.pem"
"#{__dir__}/#{cert_name}_cert.pem"
end

##
Expand All @@ -1537,7 +1535,7 @@ def self.load_key(key_name, passphrase = nil)
# Returns the path to the key named +key_name+ from <tt>test/rubygems</tt>

def self.key_path(key_name)
"#{TEST_PATH}/#{key_name}_key.pem"
"#{__dir__}/#{key_name}_key.pem"
end

# :stopdoc:
Expand Down

0 comments on commit 0efb894

Please sign in to comment.