ruby-changes:69989
From: David <ko1@a...>
Date: Tue, 30 Nov 2021 20:54:17 +0900 (JST)
Subject: [ruby-changes:69989] 2b1f048714 (master): [rubygems/rubygems] Run hooks tests on gemspecs not already installed
https://git.ruby-lang.org/ruby.git/commit/?id=2b1f048714 From 2b1f0487142419b2f45c815b3c4c4ba0bda5d13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Thu, 25 Feb 2021 17:02:32 +0100 Subject: [rubygems/rubygems] Run hooks tests on gemspecs not already installed The current `setup_base_installer` ends up using the `quick_gem` helper, which leaves the created specification installed. Instead, make sure to use the `util_spec` helper, which does a similar thing but doesn't leave the specification installed. The idea is that tests do not rely on the installer removing existing gemspecs, bacause I plan to stop doing that. https://github.com/rubygems/rubygems/commit/843f1a0abc --- test/rubygems/test_gem_installer.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index 988f14146d7..77652909c17 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -1237,7 +1237,11 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L1237 end def test_install_post_build_false - installer = setup_base_installer + @spec = util_spec 'a' + + util_build_gem @spec + + installer = util_installer @spec, @gemhome Gem.post_build do false @@ -1279,7 +1283,11 @@ gem 'other', version https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_installer.rb#L1283 end def test_install_pre_install_false - installer = setup_base_installer + @spec = util_spec 'a' + + util_build_gem @spec + + installer = util_installer @spec, @gemhome Gem.pre_install do false -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/