diff options
| author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2024-10-10 19:30:26 +0200 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-10-10 19:46:44 +0000 |
| commit | 1ad990a366a343a84c089b771be4fe6ff80b5078 (patch) | |
| tree | acfea9fa19a340e9254d57b044096bd67dcef218 /test | |
| parent | 3d8fe462dfefec1e3af67e7beb559a0a750d4da6 (diff) | |
[rubygems/rubygems] Only pristine executables for default gems
https://github.com/rubygems/rubygems/commit/1cfc1d626c
Diffstat (limited to 'test')
| -rw-r--r-- | test/rubygems/test_gem_commands_pristine_command.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/rubygems/test_gem_commands_pristine_command.rb b/test/rubygems/test_gem_commands_pristine_command.rb index 190f78c79f..2a715921b3 100644 --- a/test/rubygems/test_gem_commands_pristine_command.rb +++ b/test/rubygems/test_gem_commands_pristine_command.rb @@ -630,8 +630,16 @@ class TestGemCommandsPristineCommand < Gem::TestCase def test_execute_default_gem default_gem_spec = new_default_spec("default", "2.0.0.0", - nil, "default/gem.rb") - install_default_gems(default_gem_spec) + nil, "exe/executable") + default_gem_spec.executables = "executable" + install_default_gems default_gem_spec + + exe = File.join @gemhome, "bin", "executable" + + assert_path_exist exe, "default gem's executable not installed" + + content_with_replaced_shebang = File.read(exe).gsub(/^#![^\n]+ruby/, "#!/usr/bin/env ruby_executable_hooks") + File.write(exe, content_with_replaced_shebang) @cmd.options[:args] = %w[default] @@ -642,8 +650,7 @@ class TestGemCommandsPristineCommand < Gem::TestCase assert_equal( [ "Restoring gems to pristine condition...", - "Cached gem for default-2.0.0.0 not found, attempting to fetch...", - "Skipped default-2.0.0.0, it was not found from cache and remote sources", + "Restored default-2.0.0.0", ], @ui.output.split("\n") ) |
