diff options
-rw-r--r-- | test/rubygems/test_gem_commands_update_command.rb | 202 |
1 files changed, 192 insertions, 10 deletions
@@ -7,6 +7,12 @@ require 'rubygems/test_case' require 'rubygems/commands/update_command' class TestGemCommandsUpdateCommand < Gem::TestCase def setup @@ -19,8 +25,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase util_setup_fake_fetcher - @a1_path = File.join @gemhome, 'cache', @a1.file_name - @a2_path = File.join @gemhome, 'cache', @a2.file_name util_setup_spec_fetcher @a1, @a2 @@ -36,8 +42,8 @@ class TestGemCommandsUpdateCommand < Gem::TestCase Gem::Installer.new(@a1_path).install @cmd.options[:args] = [] - @cmd.options[:generate_rdoc] = true - @cmd.options[:generate_ri] = true use_ui @ui do @cmd.execute @@ -48,12 +54,153 @@ class TestGemCommandsUpdateCommand < Gem::TestCase assert_equal "Updating #{@a2.name}", out.shift assert_equal "Successfully installed #{@a2.full_name}", out.shift assert_equal "Gems updated: #{@a2.name}", out.shift - assert_equal "Installing ri documentation for a-2...", out.shift - assert_equal "Installing RDoc documentation for a-2...", out.shift assert_empty out end # before: # a1 -> c1.2 # after: @@ -63,7 +210,7 @@ class TestGemCommandsUpdateCommand < Gem::TestCase def test_execute_dependencies @a1.add_dependency 'c', '1.2' - @c2 = quick_gem 'c', '2' do |s| s.files = %w[lib/code.rb] s.require_paths = %w[lib] end @@ -71,9 +218,9 @@ class TestGemCommandsUpdateCommand < Gem::TestCase @a2.add_dependency 'c', '2' @a2.add_dependency 'b', '2' - @b2_path = File.join @gemhome, 'cache', @b2.file_name - @c1_2_path = File.join @gemhome, 'cache', @c1_2.file_name - @c2_path = File.join @gemhome, 'cache', @c2.file_name @source_index = Gem::SourceIndex.new @source_index.add_spec @a1 @@ -172,4 +319,39 @@ class TestGemCommandsUpdateCommand < Gem::TestCase assert_empty out end end |