summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Bundler Bot <bot@bundler.io>2017-05-29 16:30:10 +0000
committerThe Bundler Bot <bot@bundler.io>2017-05-29 16:30:10 +0000
commit595e81ef78b321cde931de601e4148db28d0aaac (patch)
treeb909f4fc0509a030a6dcc47e9b2d223610a15196
parent3187a8f31ab4ae7bedd3b4700b898ba2f17af4df (diff)
parent0c07aa2f6e1cc9979b37698e3747d9bc929941be (diff)
downloadbundler-595e81ef78b321cde931de601e4148db28d0aaac.tar.gz
Auto merge of #5675 - bundler:seg-specs-resilient-against-rubylib-shims, r=segiddins
Make the setup specs resilient agains ruby shims setting RUBYLIB Rbenv in particular does this
-rw-r--r--spec/runtime/setup_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 7f32477ad2..bd596b61ca 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -140,7 +140,9 @@ RSpec.describe "Bundler.setup" do
gem "rails"
G
- ruby <<-RUBY
+ without_bundler_load_path = ruby!("puts $LOAD_PATH").split("\n")
+
+ ruby! <<-RUBY
require 'rubygems'
require 'bundler'
Bundler.setup
@@ -152,7 +154,7 @@ RSpec.describe "Bundler.setup" do
bundler_path.join("gems/bundler-#{Bundler::VERSION}/lib").to_s,
tmp("rubygems/lib").to_s,
root.join("../lib").expand_path.to_s,
- ]
+ ] - without_bundler_load_path
load_path.map! {|lp| lp.sub(/^#{system_gem_path}/, "") }
expect(load_path).to start_with(