diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-21 18:53:57 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-21 19:28:12 +0900 |
commit | 38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1 (patch) | |
tree | 8fad28ac8a5d0deecd88a2e3e33ab0212dfb6bbf /spec/bundler/install/gems | |
parent | a47e1328e662b5c095b560b842687ed1901fd7b1 (diff) | |
download | ruby-38fa8eb4cbdc3c470a1ff5521a5ee6932356c6b1.tar.gz |
Merge rubygems/bundler master
Pick from https://github.com/rubygems/rubygems/commit/e9304aed7e43308b99e70c2f7b92028315fee8a5
Diffstat (limited to 'spec/bundler/install/gems')
-rw-r--r-- | spec/bundler/install/gems/standalone_spec.rb | 31 |
1 files changed, 30 insertions, 1 deletions
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")}" |