aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/commands/binstubs_spec.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 06:15:44 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 06:15:44 +0000
commita1a20cfaa2cf73ae8daaf2123d7c5b513427162e (patch)
tree7f112577119ebda6c3dfd71cbc24f1bc559280ae /spec/bundler/commands/binstubs_spec.rb
parentf1c33950998bf2d38d9416aa4f5dfe7f9f869f86 (diff)
downloadruby-a1a20cfaa2cf73ae8daaf2123d7c5b513427162e.tar.gz
Merge 1-16-stable branch of bundler.
It's rc version for bundler-1.16.1. I'm going to update it version after official release from bundler team. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/commands/binstubs_spec.rb')
-rw-r--r--spec/bundler/commands/binstubs_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/bundler/commands/binstubs_spec.rb b/spec/bundler/commands/binstubs_spec.rb
index 0313f48b60..ec402c327c 100644
--- a/spec/bundler/commands/binstubs_spec.rb
+++ b/spec/bundler/commands/binstubs_spec.rb
@@ -50,6 +50,25 @@ RSpec.describe "bundle binstubs <gem>" do
expect(out).to include("`bundle binstubs` needs at least one gem to run.")
end
+ context "when generating bundle binstub outside bundler" do
+ it "should abort" do
+ install_gemfile <<-G
+ source "file://#{gem_repo1}"
+ gem "rack"
+ G
+
+ bundle "binstubs rack"
+
+ File.open("bin/bundle", "wb") do |file|
+ file.print "OMG"
+ end
+
+ sys_exec "bin/rackup"
+
+ expect(last_command.stderr).to include("was not generated by Bundler")
+ end
+ end
+
context "the bundle binstub" do
before do
if system_bundler_version == :bundler