diff options
-rw-r--r-- | test/rubygems/test_gem_commands_install_command.rb | 39 |
1 files changed, 21 insertions, 18 deletions
@@ -7,6 +7,12 @@ require 'rubygems/test_case' require 'rubygems/commands/install_command' class TestGemCommandsInstallCommand < Gem::TestCase def setup @@ -22,9 +28,9 @@ class TestGemCommandsInstallCommand < Gem::TestCase util_setup_spec_fetcher @a2, @a2_pre @fetcher.data["#{@gem_repo}gems/#{@a2.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @a2.file_name)) @fetcher.data["#{@gem_repo}gems/#{@a2_pre.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @a2_pre.file_name)) @cmd.options[:args] = [@a2.name] @@ -44,11 +50,12 @@ class TestGemCommandsInstallCommand < Gem::TestCase util_setup_spec_fetcher @a2, @a2_pre @fetcher.data["#{@gem_repo}gems/#{@a2.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @a2.file_name)) @fetcher.data["#{@gem_repo}gems/#{@a2_pre.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @a2_pre.file_name)) - @cmd.handle_options [@a2_pre.name, '--version', @a2_pre.version.to_s] assert @cmd.options[:prerelease] assert @cmd.options[:version].satisfied_by?(@a2_pre.version) @@ -85,8 +92,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase util_setup_fake_fetcher @cmd.options[:domain] = :local - FileUtils.mv File.join(@gemhome, 'cache', @a2.file_name), - File.join(@tempdir) @cmd.options[:args] = [@a2.name] @@ -115,8 +121,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase util_setup_fake_fetcher @cmd.options[:user_install] = false - FileUtils.mv File.join(@gemhome, 'cache', @a2.file_name), - File.join(@tempdir) @cmd.options[:args] = [@a2.name] @@ -183,7 +188,7 @@ class TestGemCommandsInstallCommand < Gem::TestCase correctly_spelled = "non_existent_with_hint" util_setup_fake_fetcher - util_setup_spec_fetcher quick_gem(correctly_spelled, '2') @cmd.options[:args] = [misspelled] @@ -207,9 +212,9 @@ ERROR: Possible alternatives: non_existent_with_hint util_setup_spec_fetcher @a2, @a2_pre @fetcher.data["#{@gem_repo}gems/#{@a2.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @a2.file_name)) @fetcher.data["#{@gem_repo}gems/#{@a2_pre.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @a2_pre.file_name)) @cmd.options[:prerelease] = true @cmd.options[:args] = [@a2_pre.name] @@ -233,7 +238,7 @@ ERROR: Possible alternatives: non_existent_with_hint util_setup_spec_fetcher @a2 @fetcher.data["#{@gem_repo}gems/#{@a2.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @a2.file_name)) @cmd.options[:args] = [@a2.name] @@ -260,11 +265,9 @@ ERROR: Possible alternatives: non_existent_with_hint util_setup_fake_fetcher @cmd.options[:domain] = :local - FileUtils.mv File.join(@gemhome, 'cache', @a2.file_name), - File.join(@tempdir) - FileUtils.mv File.join(@gemhome, 'cache', @b2.file_name), - File.join(@tempdir) @cmd.options[:args] = [@a2.name, @b2.name] @@ -293,7 +296,7 @@ ERROR: Possible alternatives: non_existent_with_hint util_setup_spec_fetcher @b2 @fetcher.data["#{@gem_repo}gems/#{@b2.file_name}"] = - read_binary(File.join(@gemhome, 'cache', @b2.file_name)) uninstall_gem(@b2) |