diff options
author | David RodrÃguez <[email protected]> | 2020-04-27 19:19:35 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-05-08 14:13:29 +0900 |
commit | 1090456370639100cc74983945a51fcc73c54869 (patch) | |
tree | 065cb63d100bd6b10a3efb23a8f28613036d5171 /test/rubygems/test_gem_commands_setup_command.rb | |
parent | d59b92221df2188006f0323aa8af969676728ead (diff) |
[rubygems/rubygems] Move helper methods to private section of the test file
https://github.com/rubygems/rubygems/commit/b85db66e2d
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3092
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_setup_command.rb | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index 72f6a21cf7..cd5c3db59f 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -79,30 +79,6 @@ class TestGemCommandsSetupCommand < Gem::TestCase end end - def gem_install(name) - gem = util_spec name do |s| - s.executables = [name] - s.files = %W[bin/#{name}] - end - write_file File.join @tempdir, 'bin', name do |f| - f.puts '#!/usr/bin/ruby' - end - install_gem gem - File.join @gemhome, 'bin', name - end - - def gem_install_with_plugin(name) - gem = util_spec name do |s| - s.files = %W[lib/rubygems_plugin.rb] - end - write_file File.join @tempdir, 'lib', 'rubygems_plugin.rb' do |f| - f.puts "require '#{gem.plugins.first}'" - end - install_gem gem - - File.join Gem.plugindir, "#{name}_plugin.rb" - end - def test_execute_regenerate_binstubs gem_bin_path = gem_install 'a' write_file gem_bin_path do |io| @@ -389,6 +365,30 @@ class TestGemCommandsSetupCommand < Gem::TestCase private + def gem_install(name) + gem = util_spec name do |s| + s.executables = [name] + s.files = %W[bin/#{name}] + end + write_file File.join @tempdir, 'bin', name do |f| + f.puts '#!/usr/bin/ruby' + end + install_gem gem + File.join @gemhome, 'bin', name + end + + def gem_install_with_plugin(name) + gem = util_spec name do |s| + s.files = %W[lib/rubygems_plugin.rb] + end + write_file File.join @tempdir, 'lib', 'rubygems_plugin.rb' do |f| + f.puts "require '#{gem.plugins.first}'" + end + install_gem gem + + File.join Gem.plugindir, "#{name}_plugin.rb" + end + def default_gem_bin_path gem_exec = sprintf Gem.default_exec_format, 'gem' File.join @install_dir, 'bin', gem_exec |