diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-08-05 18:43:47 +0200 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2019-08-16 14:30:23 +0900 |
commit | 41534ce327efb56f3ddb136b5617fe47a89212b5 (patch) | |
tree | 97b40136f141d9ee5c052bde45d9a693a778ab7b /spec/bundler/runtime | |
parent | 3c23bb29ecbc0c736e99d23a3c47892d67f3a322 (diff) |
[bundler/bundler] Make spec pass more resiliently
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.
https://github.com/bundler/bundler/commit/764d8e8fd1
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2366
Diffstat (limited to 'spec/bundler/runtime')
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index bee4e3fdd1..866f4862c5 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -114,7 +114,7 @@ RSpec.describe "Bundler.setup" do def clean_load_path(lp) without_bundler_load_path = ruby!("puts $LOAD_PATH").split("\n") 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, bundler_path.to_s}/i, "") } end it "puts loaded gems after -I and RUBYLIB", :ruby_repo do @@ -142,6 +142,8 @@ RSpec.describe "Bundler.setup" do 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" @@ -158,6 +160,7 @@ RSpec.describe "Bundler.setup" do 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", |