diff options
author | Olle Jonsson <olle.jonsson@gmail.com> | 2020-03-16 07:36:41 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-05-08 07:38:50 +0900 |
commit | bb3d80bbbe0603e9f9689a96c7ce86682053b4dd (patch) | |
tree | 1749e52131452afe57f0cb0eed0c0c2cf8c86520 /test | |
parent | 39322317f3442e71a997503059fb644f31e0ea3e (diff) | |
download | ruby-bb3d80bbbe0603e9f9689a96c7ce86682053b4dd.tar.gz |
[rubygems/rubygems] Autoload name_tuple.rb before use
- Resolver asked Molinillo to resolve-then-activate, which led to using Gem::NameTuple before any require had been passed
Co-authored-by: David RodrÃguez <deivid.rodriguez@riseup.net>
https://github.com/rubygems/rubygems/commit/e11782b0c8
Diffstat (limited to 'test')
-rw-r--r-- | test/rubygems/test_gem.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 5f70a2ac6b..c122287e68 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -302,6 +302,21 @@ class TestGem < Gem::TestCase assert_equal %w[a-1 b-2 c-1], loaded_spec_names end + def test_activate_bin_path_in_debug_mode + a1 = util_spec 'a', '1' do |s| + s.executables = ['exec'] + end + + install_specs a1 + + output, status = Open3.capture2e( + { "GEM_HOME" => Gem.paths.home, "DEBUG_RESOLVER" => "1" }, + Gem.ruby, "-I", File.expand_path("../../lib", __dir__), "-e", "\"Gem.activate_bin_path('a', 'exec', '>= 0')\"" + ) + + assert status.success?, output + end + def test_activate_bin_path_gives_proper_error_for_bundler bundler = util_spec 'bundler', '2' do |s| s.executables = ['bundle'] |