diff options
author | Dimitris Zorbas <zorbash@skroutz.gr> | 2015-10-22 00:17:20 +0300 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-13 16:06:52 -0500 |
commit | f619a9c944fedf2bd50029426eb698dbb0e2118f (patch) | |
tree | 35e821e9a9a4acf84164a224d4fcd6c8a277b8b2 /spec/commands | |
parent | e8fd5795778379bd821e34173b678f76f240fa97 (diff) | |
download | bundler-f619a9c944fedf2bd50029426eb698dbb0e2118f.tar.gz |
Add --shebang option to binstubs commandseg-binstubs-shebang
bundle install `--binstubs` option is to be removed from Bundler 2.0 but
currently supports setting the shebang using the `--shebang` option.
See #1467 introducing the `--shebang` option, which with this commit
is ported to the binstubs command.
Diffstat (limited to 'spec/commands')
-rw-r--r-- | spec/commands/binstubs_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index f3ca2301a7..430dbef314 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -103,6 +103,19 @@ RSpec.describe "bundle binstubs <gem>" do expect(File.stat(binary).mode.to_s(8)).to eq("100775") end end + + context "when using --shebang" do + it "sets the specified shebang for the the binstub" do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + + bundle "binstubs rack --shebang jruby" + + expect(File.open("bin/rackup").gets).to eq("#!/usr/bin/env jruby\n") + end + end end context "when the gem doesn't exist" do |