diff options
author | David RodrÃguez <[email protected]> | 2021-11-04 20:20:47 +0100 |
---|---|---|
committer | git <[email protected]> | 2021-11-05 23:20:47 +0900 |
commit | e60c1f7556878c9e65a6adad537f29c07aea64ee (patch) | |
tree | 2c463dfa16b7513504f4a6eb5777dc3867907a8c /test/rubygems/test_gem_commands_setup_command.rb | |
parent | 5b941ec90dd76ddb78a3c9e5179f3eee801b4036 (diff) |
[rubygems/rubygems] Refactor setup tests to not always pass `--prefix`
Standard usage should be tested by default. I will add a test for
`--prefix` once I fix that option since it's not working correctly at
the moment.
https://github.com/rubygems/rubygems/commit/50a7e34586
Diffstat (limited to 'test/rubygems/test_gem_commands_setup_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_setup_command.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb index b66943610d..1de9a477db 100644 --- a/test/rubygems/test_gem_commands_setup_command.rb +++ b/test/rubygems/test_gem_commands_setup_command.rb @@ -14,9 +14,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase def setup super - @install_dir = File.join @tempdir, 'install' @cmd = Gem::Commands::SetupCommand.new - @cmd.options[:prefix] = @install_dir filelist = %w[ bin/gem @@ -269,7 +267,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase end def test_remove_old_lib_files - lib = File.join @install_dir, 'lib' + lib = RbConfig::CONFIG["sitelibdir"] lib_rubygems = File.join lib, 'rubygems' lib_bundler = File.join lib, 'bundler' lib_rubygems_defaults = File.join lib_rubygems, 'defaults' @@ -300,7 +298,7 @@ class TestGemCommandsSetupCommand < Gem::TestCase end def test_remove_old_man_files - man = File.join @install_dir, 'man' + man = File.join RbConfig::CONFIG['mandir'], 'man' ruby_1 = File.join man, 'man1', 'ruby.1' bundle_b_1 = File.join man, 'man1', 'bundle-b.1' @@ -406,14 +404,14 @@ class TestGemCommandsSetupCommand < Gem::TestCase end def default_gem_bin_path - File.join @install_dir, 'bin', 'gem' + File.join RbConfig::CONFIG['bindir'], 'gem' end def default_bundle_bin_path - File.join @install_dir, 'bin', 'bundle' + File.join RbConfig::CONFIG['bindir'], 'bundle' end def default_bundler_bin_path - File.join @install_dir, 'bin', 'bundler' + File.join RbConfig::CONFIG['bindir'], 'bundler' end end unless Gem.java_platform? |