diff options
| author | Carl Lerche <carllerche@mac.com> | 2010-07-13 15:05:54 -0700 |
|---|---|---|
| committer | Carl Lerche <carllerche@mac.com> | 2010-07-13 15:05:54 -0700 |
| commit | 911403eb5ec2827c422bdd59a6bb10c9b0780e5c (patch) | |
| tree | f96bdf184ef73856daeb9199b3cef57860032ed3 /spec/runtime/executable_spec.rb | |
| parent | fecd2db7273621ea347517bdb5d158af5a61ca0b (diff) | |
| download | bundler-911403eb5ec2827c422bdd59a6bb10c9b0780e5c.tar.gz | |
Allows the location of binstubs to be specified
Diffstat (limited to 'spec/runtime/executable_spec.rb')
| -rw-r--r-- | spec/runtime/executable_spec.rb | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/spec/runtime/executable_spec.rb b/spec/runtime/executable_spec.rb index 7cda266f20..da3cbe8d2a 100644 --- a/spec/runtime/executable_spec.rb +++ b/spec/runtime/executable_spec.rb @@ -1,12 +1,14 @@ require "spec_helper" describe "Running bin/* commands" do - it "runs the bundled command when in the bundle" do + before :each do gemfile <<-G source "file://#{gem_repo1}" gem "rack" G + end + it "runs the bundled command when in the bundle" do bundle "install --binstubs" build_gem "rack", "2.0", :to_system => true do |s| @@ -17,12 +19,24 @@ describe "Running bin/* commands" do out.should == "1.0.0" end - it "runs the bundled command when out of the bundle" do - gemfile <<-G - source "file://#{gem_repo1}" - gem "rack" - G + it "allows the location of the gem stubs to be specified" do + bundle "install --binstubs gbin" + + bundled_app("bin").should_not exist + bundled_app("gbin/rackup").should exist + + gembin bundled_app("gbin/rackup") + out.should == "1.0.0" + end + + it "allows absolute paths as a specification of where to install bin stubs" do + bundle "install --binstubs #{tmp}/bin" + + gembin tmp("bin/rackup") + out.should == "1.0.0" + end + it "runs the bundled command when out of the bundle" do bundle "install --binstubs" build_gem "rack", "2.0", :to_system => true do |s| @@ -70,11 +84,6 @@ describe "Running bin/* commands" do end it "does not generate bin stubs if the option was not specified" do - gemfile <<-G - source "file://#{gem_repo1}" - gem "rack" - G - bundle "install" bundled_app("bin/rackup").should_not exist |
