1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Remove unnecessary spec manipulation

https://github.com/rubygems/rubygems/commit/c7c00c280f
This commit is contained in:
David Rodríguez 2019-10-28 18:08:07 +01:00 committed by Hiroshi SHIBATA
parent 199083dd15
commit 19d77a1cfc
Notes: git 2021-08-31 19:07:17 +09:00
2 changed files with 8 additions and 4 deletions

View file

@ -1121,7 +1121,6 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
ensure
Gem::DefaultUserInteraction.ui.close
end
@gemdeps.requested_specs.map(&:to_spec).sort_by(&:name)
end
rescue => e

View file

@ -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")) }