From 1a8d3383374fe7e94d8659d21e39757387b10c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 28 May 2025 14:18:44 +0200 Subject: [PATCH] Initialize `gems` tmp when initializing bundled_gems_spec suite That way it works even if no Bundler specs have run before. --- spec/bundled_gems_spec.rb | 1 + spec/bundler/support/path.rb | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index 32540e7ffd..c362881850 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -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| diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb index cbfafd4575..6f7ee589c2 100644 --- a/spec/bundler/support/path.rb +++ b/spec/bundler/support/path.rb @@ -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