Skip to content

Commit 1a8d338

Browse files
deivid-rodriguezhsbt
authored andcommitted
Initialize gems tmp when initializing bundled_gems_spec suite
That way it works even if no Bundler specs have run before.
1 parent bb4d9f3 commit 1a8d338

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

spec/bundled_gems_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def self.ruby=(ruby)
2424
require_relative "bundler/support/rubygems_ext"
2525
Spec::Rubygems.test_setup
2626
Spec::Helpers.install_dev_bundler
27+
FileUtils.mkdir_p Spec::Path.gem_path
2728
end
2829

2930
config.around(:each) do |example|

spec/bundler/support/path.rb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,31 +195,31 @@ def file_uri_for(path)
195195
end
196196

197197
def gem_repo1(*args)
198-
tmp("gems/remote1", *args)
198+
gem_path("remote1", *args)
199199
end
200200

201201
def gem_repo_missing(*args)
202-
tmp("gems/missing", *args)
202+
gem_path("missing", *args)
203203
end
204204

205205
def gem_repo2(*args)
206-
tmp("gems/remote2", *args)
206+
gem_path("remote2", *args)
207207
end
208208

209209
def gem_repo3(*args)
210-
tmp("gems/remote3", *args)
210+
gem_path("remote3", *args)
211211
end
212212

213213
def gem_repo4(*args)
214-
tmp("gems/remote4", *args)
214+
gem_path("remote4", *args)
215215
end
216216

217217
def security_repo(*args)
218-
tmp("gems/security_repo", *args)
218+
gem_path("security_repo", *args)
219219
end
220220

221221
def system_gem_path(*path)
222-
tmp("gems/system", *path)
222+
gem_path("system", *path)
223223
end
224224

225225
def pristine_system_gem_path
@@ -234,6 +234,10 @@ def scoped_gem_path(base)
234234
base.join(Gem.ruby_engine, RbConfig::CONFIG["ruby_version"])
235235
end
236236

237+
def gem_path(*args)
238+
tmp("gems", *args)
239+
end
240+
237241
def lib_path(*args)
238242
tmp("libs", *args)
239243
end

0 commit comments

Comments
 (0)