Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Make spec pass more resiliently
Browse files Browse the repository at this point in the history
Previously, if bundler-2.1.0.pre.1 would be installed globally, it would
fail. Now we force that a locally installed version of bundler is used,
so it always passed regardless of which bundler is installed globally.
  • Loading branch information
deivid-rodriguez committed Aug 6, 2019
1 parent 106865a commit 547a116
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/runtime/setup_spec.rb
Expand Up @@ -109,7 +109,7 @@
def clean_load_path(lp)
without_bundler_load_path = ruby!("puts $LOAD_PATH").split("\n")
lp = lp - without_bundler_load_path
lp.map! {|p| p.sub(/^#{Regexp.union system_gem_path.to_s, default_bundle_path.to_s}/i, "") }
lp.map! {|p| p.sub(/^#{Regexp.union system_gem_path.to_s, default_bundle_path.to_s, lib.to_s}/i, "") }
end

it "puts loaded gems after -I and RUBYLIB", :ruby_repo do
Expand All @@ -136,6 +136,8 @@ def clean_load_path(lp)
end

it "orders the load path correctly when there are dependencies" do
system_gems :bundler

install_gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rails"
Expand All @@ -151,6 +153,7 @@ def clean_load_path(lp)

expect(load_path).to start_with(
"/gems/rails-2.3.2/lib",
"/gems/bundler-#{Bundler::VERSION}/lib",
"/gems/activeresource-2.3.2/lib",
"/gems/activerecord-2.3.2/lib",
"/gems/actionpack-2.3.2/lib",
Expand Down

0 comments on commit 547a116

Please sign in to comment.