From 2b1f0487142419b2f45c815b3c4c4ba0bda5d13f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= 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 988f14146d..77652909c1 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -1237,7 +1237,11 @@ gem 'other', version 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 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.3