ruby-changes:68426
From: David <ko1@a...>
Date: Wed, 13 Oct 2021 16:22:03 +0900 (JST)
Subject: [ruby-changes:68426] ad4e7308d2 (master): [rubygems/rubygems] Make spec more realistic
https://git.ruby-lang.org/ruby.git/commit/?id=ad4e7308d2 From ad4e7308d2c269ee3bd88fbc3a153d76fc3e9910 Mon Sep 17 00:00:00 2001 From: David Rodriguez <deivid.rodriguez@r...> Date: Sat, 9 Oct 2021 13:21:55 +0200 Subject: [rubygems/rubygems] Make spec more realistic The spec was just faking an installed gemspec without any installed gem backing it up, resulting in `bundle install` claiming that the gem was already installed when it was not. https://github.com/rubygems/rubygems/commit/c35531d1c7 --- spec/bundler/install/gemspecs_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/bundler/install/gemspecs_spec.rb b/spec/bundler/install/gemspecs_spec.rb index 0c4518fe2b..3684d8749d 100644 --- a/spec/bundler/install/gemspecs_spec.rb +++ b/spec/bundler/install/gemspecs_spec.rb @@ -34,6 +34,8 @@ RSpec.describe "bundle install" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemspecs_spec.rb#L34 gem 'rack' G + system_gems "rack-1.0.0", :path => default_bundle_path + FileUtils.mkdir_p "#{default_bundle_path}/specifications" File.open("#{default_bundle_path}/specifications/rack-1.0.0.gemspec", "w+") do |f| spec = Gem::Specification.new do |s| @@ -44,7 +46,7 @@ RSpec.describe "bundle install" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/install/gemspecs_spec.rb#L46 f.write spec.to_ruby end bundle :install, :artifice => "endpoint_marshal_fail" # force gemspec load - expect(the_bundle).to include_gems "activesupport 2.3.2" + expect(the_bundle).to include_gems "rack 1.0.0", "activesupport 2.3.2" end it "does not hang when gemspec has incompatible encoding" do -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/