summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-02-25 17:02:32 +0100
committergit <svn-admin@ruby-lang.org>2021-11-30 20:54:04 +0900
commit2b1f0487142419b2f45c815b3c4c4ba0bda5d13f (patch)
treeb700cfa23b0c4085d6812c417f31002208d8b60a /test
parente59f3054c308fc657224d2dde8d100816b82de84 (diff)
[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
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_gem_installer.rb12
1 files 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