summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2026-01-15 15:29:22 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2026-01-15 16:16:16 +0900
commit2d79cc9bfc3fdd27e3de9d540c37d0367ed16d1e (patch)
tree1a3ad66d96c2a8b6a288c3f223ed87749bac6bb7
parenta28c8561835038d564a418c6d5dbd7cabfbcad4f (diff)
Added example for bundle/inline
-rw-r--r--spec/bundled_gems_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb
index e86b5ce6e8..d985ddad41 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)