diff options
Diffstat (limited to 'spec/commands/exec_spec.rb')
-rw-r--r-- | spec/commands/exec_spec.rb | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 42afbd24ba..4dc47919de 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -2,8 +2,9 @@ require "spec_helper" describe "bundle exec" do + let(:system_gems_to_install) { %w(rack-1.0.0 rack-0.9.1) } before :each do - system_gems "rack-1.0.0", "rack-0.9.1" + system_gems(system_gems_to_install) end it "activates the correct gem" do @@ -627,4 +628,26 @@ __FILE__: #{path.to_s.inspect} end end end + + context "nested bundle exec" do + let(:system_gems_to_install) { super() << :bundler } + before do + gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + bundle :install, :system_bundler => true, :path => "vendor/bundler" + end + + it "overrides disable_shared_gems so bundler can be found" do + file = bundled_app("file_that_bundle_execs.rb") + create_file(file, <<-RB) + #!#{Gem.ruby} + puts `bundle exec echo foo` + RB + file.chmod(0o777) + bundle! "exec #{file}", :system_bundler => true + expect(out).to eq("foo") + end + end end |