Skip to content

Commit 877ae93

Browse files
deivid-rodriguezk0kubun
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 439428c commit 877ae93

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

spec/bundled_gems_spec.rb

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

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

spec/bundler/support/path.rb

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

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

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

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

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

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

221221
def security_repo(*args)
222-
tmp("gems/security_repo", *args)
222+
gem_path("security_repo", *args)
223223
end
224224

225225
def system_gem_path(*path)
226-
tmp("gems/system", *path)
226+
gem_path("system", *path)
227227
end
228228

229229
def pristine_system_gem_path
@@ -238,6 +238,10 @@ def scoped_gem_path(base)
238238
base.join(Gem.ruby_engine, RbConfig::CONFIG["ruby_version"])
239239
end
240240

241+
def gem_path(*args)
242+
tmp("gems", *args)
243+
end
244+
241245
def lib_path(*args)
242246
tmp("libs", *args)
243247
end

0 commit comments

Comments
 (0)