diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-02-01 16:17:16 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-03-08 13:47:35 +0900 |
commit | 53468cc11147b0d285fc376fc546b677dad600ca (patch) | |
tree | eb9c97f544d089be2d324126b025b11f41a22c90 /spec/bundler/runtime/setup_spec.rb | |
parent | 2ab6b7a7516e1b2c48a66ce513afabb62d101461 (diff) |
Sync latest development version of bundler & rubygems
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4143
Diffstat (limited to 'spec/bundler/runtime/setup_spec.rb')
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index e2bed00a7f..a0036df39e 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -1252,7 +1252,7 @@ end exempts << "fiddle" if Gem.win_platform? && Gem::Version.new(Gem::VERSION) >= Gem::Version.new("2.7") exempts << "uri" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.7") exempts << "pathname" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0") - exempts << "set" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0") + exempts << "set" unless Gem::Version.new(Gem::VERSION) >= Gem::Version.new("3.2.6") exempts << "tsort" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0") exempts end @@ -1334,36 +1334,8 @@ end expect(out).to eq("The Gemfile's dependencies are satisfied") end - # bundler respects paths specified directly in RUBYLIB or RUBYOPT, and - # that happens when running ruby from the ruby-core setup. To - # workaround, we manually remove those for these tests when they would - # override the default gem. - def load_path_exclusions_hack_for(name) - if ruby_core? - if ENV.key?("PWD") - # .ext/common is relative from build directory - ext_folder = Pathname(ENV["PWD"]) + ".ext/common" - else - ext_folder = source_root.join(".ext/common") - end - require_name = name.tr("-", "/") - if File.exist?(ext_folder.join("#{require_name}.rb")) - { :exclude_from_load_path => ext_folder.to_s } - else - lib_folder = source_lib_dir - if File.exist?(lib_folder.join("#{require_name}.rb")) - { :exclude_from_load_path => lib_folder.to_s } - else - {} - end - end - else - {} - end - end - Gem::Specification.select(&:default_gem?).map(&:name).each do |g| - it "activates newer versions of #{g}" do + it "activates newer versions of #{g}", :ruby_repo do skip if exemptions.include?(g) build_repo4 do @@ -1375,11 +1347,10 @@ end gem "#{g}", "999999" G - opts = { :env => { "RUBYOPT" => activation_warning_hack_rubyopt } } - expect(the_bundle).to include_gem("#{g} 999999", opts.merge(load_path_exclusions_hack_for(g))) + expect(the_bundle).to include_gem("#{g} 999999", :env => { "RUBYOPT" => activation_warning_hack_rubyopt }) end - it "activates older versions of #{g}" do + it "activates older versions of #{g}", :ruby_repo do skip if exemptions.include?(g) build_repo4 do @@ -1391,8 +1362,7 @@ end gem "#{g}", "0.0.0.a" G - opts = { :env => { "RUBYOPT" => activation_warning_hack_rubyopt } } - expect(the_bundle).to include_gem("#{g} 0.0.0.a", opts.merge(load_path_exclusions_hack_for(g))) + expect(the_bundle).to include_gem("#{g} 0.0.0.a", :env => { "RUBYOPT" => activation_warning_hack_rubyopt }) end end end |