diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2026-01-15 15:29:22 +0900 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2026-01-20 10:49:33 -0800 |
| commit | 310da6cd91ccdab82f5cb9cef482f5cf9da1bb19 (patch) | |
| tree | 3d8e6464a150fa89323dd26a9b6afdff71236d59 | |
| parent | 3046e27852c46e32872a8a08644366a859ceca1e (diff) | |
Added example for bundle/inline
| -rw-r--r-- | spec/bundled_gems_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index c2a655929a..909023a903 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -393,6 +393,30 @@ RSpec.describe "bundled_gems.rb" do end end + context "with bundler/inline" do + it "foo is available on LOAD_PATH" do + build_lib "foo", "1.0.0" do |s| + s.write "lib/foo.rb", "puts :foo" + end + + script <<-RUBY, env: { "BUNDLER_SPEC_GEM_REPO" => gem_repo1.to_s } + #!/usr/bin/env ruby + gemfile do + source "https://gem.repo1" + path "#{lib_path}" do + gem "foo", "1.0.0" + end + end + + Gem::BUNDLED_GEMS.force_activate("csv") + puts $LOAD_PATH + RUBY + + expect(err).to include("gem install csv") + expect(out).to include("foo-1.0.0/lib") + end + end + context "without bundle environment" do it "warns about installation requirement" do expect_any_instance_of(Object).to receive(:warn) |
