From 0c07aa2f6e1cc9979b37698e3747d9bc929941be Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Tue, 23 May 2017 17:30:44 -0500 Subject: Make the setup specs resilient agains ruby shims setting RUBYLIB Rbenv in particular does this --- spec/runtime/setup_spec.rb | 6 ++++-- 1 file 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( -- cgit v1.2.1