Initialize gems tmp when initializing bundled_gems_spec suite

That way it works even if no Bundler specs have run before.
This commit is contained in:
David Rodríguez 2025-05-28 14:18:44 +02:00 committed by Hiroshi SHIBATA
parent bb4d9f3f61
commit 1a8d338337
Notes: git 2025-05-29 01:09:41 +00:00
2 changed files with 12 additions and 7 deletions

View File

@ -24,6 +24,7 @@ RSpec.configure do |config|
require_relative "bundler/support/rubygems_ext"
Spec::Rubygems.test_setup
Spec::Helpers.install_dev_bundler
FileUtils.mkdir_p Spec::Path.gem_path
end
config.around(:each) do |example|

View File

@ -195,31 +195,31 @@ module Spec
end
def gem_repo1(*args)
tmp("gems/remote1", *args)
gem_path("remote1", *args)
end
def gem_repo_missing(*args)
tmp("gems/missing", *args)
gem_path("missing", *args)
end
def gem_repo2(*args)
tmp("gems/remote2", *args)
gem_path("remote2", *args)
end
def gem_repo3(*args)
tmp("gems/remote3", *args)
gem_path("remote3", *args)
end
def gem_repo4(*args)
tmp("gems/remote4", *args)
gem_path("remote4", *args)
end
def security_repo(*args)
tmp("gems/security_repo", *args)
gem_path("security_repo", *args)
end
def system_gem_path(*path)
tmp("gems/system", *path)
gem_path("system", *path)
end
def pristine_system_gem_path
@ -234,6 +234,10 @@ module Spec
base.join(Gem.ruby_engine, RbConfig::CONFIG["ruby_version"])
end
def gem_path(*args)
tmp("gems", *args)
end
def lib_path(*args)
tmp("libs", *args)
end