Skip to content

Commit f3c73c8

Browse files
masak1yuclaude
andcommitted
Fix test: set BUNDLE_GEMFILE to bundled_app path so Bundler.root resolves correctly
The test was failing because BUNDLE_GEMFILE was set to a relative "Gemfile" path (inherited from the parent describe block), causing Bundler.root to resolve to the process's current working directory instead of bundled_app. This meant bin_path.directory? could not find the test's bin/ directory. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6fa7975 commit f3c73c8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

spec/bundler/shared_helpers_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@
347347
before do
348348
Dir.mkdir bundled_app(".bundle")
349349
Dir.mkdir(bundled_app("bin")) unless File.directory?(bundled_app("bin"))
350+
ENV["BUNDLE_GEMFILE"] = bundled_app_gemfile.to_s
350351
ENV["PATH"] = "/usr/bin"
351352
end
352353

@@ -364,6 +365,7 @@
364365
before do
365366
Dir.mkdir bundled_app(".bundle")
366367
FileUtils.rm_rf(bundled_app("bin"))
368+
ENV["BUNDLE_GEMFILE"] = bundled_app_gemfile.to_s
367369
ENV["PATH"] = "/usr/bin"
368370
end
369371

0 commit comments

Comments
 (0)