Skip to content

Commit f3d6a16

Browse files
hsbtclaude
andcommitted
Fix test to verify Bundler.setup respects custom gemfile setting
The test was only checking that `bundle install` works with a custom gemfile, but the purpose of this PR is to make `Bundler.setup` respect the setting too. Updated the test to actually invoke Bundler.setup and verify it loads gems from the custom gemfile. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5e63331 commit f3d6a16

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

spec/runtime/setup_spec.rb

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,19 +307,26 @@ def clean_load_path(lp)
307307
context "user sets it via `config set --local gemfile`" do
308308
it "uses the value in the config" do
309309
gemfile <<-G
310-
source "#{file_uri_for(gem_repo1)}"
311-
gem "rack"
310+
source "https://gem.repo1"
311+
gem "myrack"
312312
G
313313

314-
gemfile bundled_app("gemfake"), <<-G
315-
source "#{file_uri_for(gem_repo1)}"
314+
gemfile bundled_app("CustomGemfile"), <<-G
315+
source "https://gem.repo1"
316316
gem "activesupport", "2.3.5"
317317
G
318318

319-
bundle "config set --local gemfile #{bundled_app("gemfake")}"
319+
bundle "config set --local gemfile #{bundled_app("CustomGemfile")}"
320320
bundle "install"
321321

322-
expect(the_bundle).to include_gems "activesupport 2.3.5"
322+
ruby <<-R
323+
require 'bundler'
324+
Bundler.setup
325+
require 'activesupport'
326+
puts ACTIVESUPPORT
327+
R
328+
329+
expect(out).to eq("2.3.5")
323330
end
324331
end
325332
end

0 commit comments

Comments
 (0)