diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-05-23 17:30:44 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-05-23 17:30:44 -0500 |
commit | 0c07aa2f6e1cc9979b37698e3747d9bc929941be (patch) | |
tree | 6091863f7fc5e80e73ca1b853ce2b7fe3c98cbec | |
parent | 13c693f82bb2ba61132caa23eafee8907072450e (diff) | |
download | bundler-seg-specs-resilient-against-rubylib-shims.tar.gz |
Make the setup specs resilient agains ruby shims setting RUBYLIBseg-specs-resilient-against-rubylib-shims
Rbenv in particular does this
-rw-r--r-- | spec/runtime/setup_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb index 33833becd7..101254b9b9 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( |