diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-14 06:01:35 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-14 06:01:35 +0000 |
commit | 68ddd4d300e9a88737c4f37af74e1a0312949b2f (patch) | |
tree | 787e1e83d76934ce039eb336995a8d5bb53a89e6 /spec/bundler/install/binstubs_spec.rb | |
parent | d636809c057432e8d42abe30c6c6785eb0721d77 (diff) |
Merge Bundler 2.1.0.pre.1 as developed version from upstream.
https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/install/binstubs_spec.rb')
-rw-r--r-- | spec/bundler/install/binstubs_spec.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/spec/bundler/install/binstubs_spec.rb b/spec/bundler/install/binstubs_spec.rb index f04d3fe654..daa20693c7 100644 --- a/spec/bundler/install/binstubs_spec.rb +++ b/spec/bundler/install/binstubs_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe "bundle install", :bundler => "< 3" do +RSpec.describe "bundle install" do describe "when system_bindir is set" do # On OS X, Gem.bindir defaults to /usr/bin, so system_bindir is useful if # you want to avoid sudo installs for system gems with OS X's default ruby @@ -20,7 +20,7 @@ RSpec.describe "bundle install", :bundler => "< 3" do end end - describe "when multiple gems contain the same exe", :bundler => "< 3" do + describe "when multiple gems contain the same exe" do before do build_repo2 do build_gem "fake", "14" do |s| @@ -28,16 +28,25 @@ RSpec.describe "bundle install", :bundler => "< 3" do end end - install_gemfile <<-G, :binstubs => true + install_gemfile <<-G source "file://#{gem_repo2}" gem "fake" gem "rack" G end - it "loads the correct spec's executable" do - gembin("rackup") - expect(out).to eq("1.2") + it "warns about the situation" do + bundle! "exec rackup" + + expect(last_command.stderr).to include( + "The `rackup` executable in the `fake` gem is being loaded, but it's also present in other gems (rack).\n" \ + "If you meant to run the executable for another gem, make sure you use a project specific binstub (`bundle binstub <gem_name>`).\n" \ + "If you plan to use multiple conflicting executables, generate binstubs for them and disambiguate their names." + ).or include( + "The `rackup` executable in the `rack` gem is being loaded, but it's also present in other gems (fake).\n" \ + "If you meant to run the executable for another gem, make sure you use a project specific binstub (`bundle binstub <gem_name>`).\n" \ + "If you plan to use multiple conflicting executables, generate binstubs for them and disambiguate their names." + ) end end end |