From d386a58f6f1865aaa35eda5af55cff3ff3cca4ca Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 15 Oct 2020 13:20:25 +0900 Subject: Merge bundler-2.2.0.rc.2 --- spec/bundler/install/path_spec.rb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'spec/bundler/install/path_spec.rb') diff --git a/spec/bundler/install/path_spec.rb b/spec/bundler/install/path_spec.rb index 2239706020..a05467db12 100644 --- a/spec/bundler/install/path_spec.rb +++ b/spec/bundler/install/path_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true RSpec.describe "bundle install" do - describe "with --path" do + describe "with path configured" do before :each do build_gem "rack", "1.0.0", :to_system => true do |s| s.write "lib/rack.rb", "puts 'FAIL'" @@ -13,12 +13,20 @@ RSpec.describe "bundle install" do G end - it "does not use available system gems with bundle --path vendor/bundle", :bundler => "< 3" do + it "does not use available system gems with `vendor/bundle" do bundle "config --local path vendor/bundle" bundle :install expect(the_bundle).to include_gems "rack 1.0.0" end + it "uses system gems with `path.system` configured with more priority than `path`" do + bundle "config --local path.system true" + bundle "config --global path vendor/bundle" + bundle :install + run "require 'rack'", :raise_on_error => false + expect(out).to include("FAIL") + end + it "handles paths with regex characters in them" do dir = bundled_app("bun++dle") dir.mkpath @@ -30,7 +38,7 @@ RSpec.describe "bundle install" do dir.rmtree end - it "prints a warning to let the user know what has happened with bundle --path vendor/bundle" do + it "prints a message to let the user know where gems where installed" do bundle "config --local path vendor/bundle" bundle :install expect(out).to include("gems are installed into `./vendor/bundle`") -- cgit v1.2.3