diff options
author | Boggs <hello.boggs@gmail.com> | 2016-05-25 05:41:17 +0800 |
---|---|---|
committer | Boggs <hello.boggs@gmail.com> | 2016-05-25 05:41:17 +0800 |
commit | 3f8b9381b8eb47aa2ce988a9911db7d901626db6 (patch) | |
tree | 43bc5f409d29c88b4e22de72d1672bc5578ea6d0 /spec | |
parent | dbad52b5b477936b25c2c5605247a9e70a0796cb (diff) | |
download | bundler-3f8b9381b8eb47aa2ce988a9911db7d901626db6.tar.gz |
Add standalone flag to binstubs, fix #4594
Diffstat (limited to 'spec')
-rw-r--r-- | spec/commands/binstubs_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index ee319e016c..1d7deac6fd 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -145,6 +145,21 @@ describe "bundle binstubs <gem>" do end end + context "--standalone" do + it "includes the standalone path" do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + + bundle "install --standalone" + bundle "binstubs rack --standalone" + + standalone_line = File.read(bundled_app("bin/rackup")).each_line.find {|line| line.include? "$:.unshift" }.strip + expect(standalone_line).to eq "$:.unshift File.expand_path '../../bundle', __FILE__" + end + end + context "when the bin already exists" do it "doesn't overwrite and warns" do FileUtils.mkdir_p(bundled_app("bin")) |