From 38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 21 Feb 2023 18:53:57 +0900 Subject: Merge rubygems/bundler master Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5 --- spec/bundler/install/gems/standalone_spec.rb | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'spec/bundler/install/gems/standalone_spec.rb') diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb index ab10670fdf..4d08752256 100644 --- a/spec/bundler/install/gems/standalone_spec.rb +++ b/spec/bundler/install/gems/standalone_spec.rb @@ -170,7 +170,7 @@ RSpec.shared_examples "bundle install --standalone" do end end - describe "with Gemfiles using path sources and resulting bundle moved to a folder hierarchy with different nesting" do + describe "with Gemfiles using absolute path sources and resulting bundle moved to a folder hierarchy with different nesting" do before do build_lib "minitest", "1.0.0", :path => lib_path("minitest") @@ -200,6 +200,35 @@ RSpec.shared_examples "bundle install --standalone" do end end + describe "with Gemfiles using relative path sources and app moved to a different root" do + before do + FileUtils.mkdir_p bundled_app("app/vendor") + + build_lib "minitest", "1.0.0", :path => bundled_app("app/vendor/minitest") + + gemfile bundled_app("app/Gemfile"), <<-G + source "#{file_uri_for(gem_repo1)}" + gem "minitest", :path => "vendor/minitest" + G + + bundle "install", :standalone => true, :dir => bundled_app("app") + + FileUtils.mv(bundled_app("app"), bundled_app2("app")) + end + + it "also works" do + ruby <<-RUBY, :dir => bundled_app2("app") + require "./bundle/bundler/setup" + + require "minitest" + puts MINITEST + RUBY + + expect(out).to eq("1.0.0") + expect(err).to be_empty + end + end + describe "with gems with native extension" do before do bundle "config set --local path #{bundled_app("bundle")}" -- cgit v1.2.3