summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-10-28 18:08:07 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit19d77a1cfc8efa1d03083689f7de78a52ef05be6 (patch)
tree6363999410c62bbf5f80815bcadb57237e64470f /test/rubygems/test_gem.rb
parent199083dd158c993998412d28d15df01e128e3981 (diff)
[rubygems/rubygems] Remove unnecessary spec manipulation
https://github.com/rubygems/rubygems/commit/c7c00c280f
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'test/rubygems/test_gem.rb')
-rw-r--r--test/rubygems/test_gem.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index 12612bd759..608c6bacd2 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -674,7 +674,9 @@ class TestGem < Gem::TestCase
begin
Dir.chdir 'detect/a/b'
- assert_equal add_bundler_full_name([]), Gem.use_gemdeps.map(&:full_name)
+ Gem.use_gemdeps
+
+ assert_equal add_bundler_full_name([]), loaded_spec_names
ensure
Dir.chdir @tempdir
end
@@ -1713,8 +1715,11 @@ class TestGem < Gem::TestCase
ENV['RUBYGEMS_GEMDEPS'] = "-"
- expected_specs = [a, b, util_spec("bundler", Bundler::VERSION), c].compact
- assert_equal expected_specs, Gem.use_gemdeps.sort_by {|s| s.name }
+ expected_specs = [a, b, util_spec("bundler", Bundler::VERSION), c].compact.map(&:full_name)
+
+ Gem.use_gemdeps
+
+ assert_equal expected_specs, loaded_spec_names
end
BUNDLER_LIB_PATH = File.expand_path $LOAD_PATH.find {|lp| File.file?(File.join(lp, "bundler.rb")) }