summaryrefslogtreecommitdiff
path: root/spec/bundler/install/path_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 13:20:25 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-10-15 17:19:02 +0900
commitd386a58f6f1865aaa35eda5af55cff3ff3cca4ca (patch)
tree0665fe806540deae7f8e52095af6dba70f940aa3 /spec/bundler/install/path_spec.rb
parent7ffd14a18c341565afaf80d259f9fe5df8a13d29 (diff)
Merge bundler-2.2.0.rc.2
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3659
Diffstat (limited to 'spec/bundler/install/path_spec.rb')
-rw-r--r--spec/bundler/install/path_spec.rb14
1 files changed, 11 insertions, 3 deletions
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`")