diff options
Diffstat (limited to 'spec/bundler/shared_helpers_spec.rb')
-rw-r--r-- | spec/bundler/shared_helpers_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb index b8f099d5ba..72b1c2a51f 100644 --- a/spec/bundler/shared_helpers_spec.rb +++ b/spec/bundler/shared_helpers_spec.rb @@ -378,6 +378,16 @@ RSpec.describe Bundler::SharedHelpers do it_behaves_like "ENV['RUBYLIB'] gets set correctly" end + context "bundle executable in ENV['BUNDLE_BIN_PATH'] does not exist" do + before { ENV["BUNDLE_BIN_PATH"] = "/does/not/exist" } + before { Bundler.rubygems.replace_bin_path [], [] } + + it "sets BUNDLE_BIN_PATH to the bundle executable file" do + subject.set_bundle_environment + expect(ENV["BUNDLE_BIN_PATH"]).to eq(File.expand_path("../../../exe/bundle", __FILE__)) + end + end + context "ENV['RUBYLIB'] already contains the bundler's ruby version lib path" do let(:ruby_lib_path) { "stubbed_ruby_lib_dir" } |