diff options
-rw-r--r-- | test/rubygems/test_gem_commands_install_command.rb | 107 |
1 files changed, 98 insertions, 9 deletions
@@ -11,6 +11,52 @@ class TestGemCommandsInstallCommand < RubyGemTestCase @cmd.options[:generate_ri] = false end def test_execute_include_dependencies @cmd.options[:include_dependencies] = true @cmd.options[:args] = [] @@ -57,6 +103,34 @@ class TestGemCommandsInstallCommand < RubyGemTestCase assert out.empty?, out.inspect end def test_execute_local_missing util_setup_fake_fetcher @cmd.options[:domain] = :local @@ -100,6 +174,29 @@ class TestGemCommandsInstallCommand < RubyGemTestCase @ui.error end def test_execute_remote @cmd.options[:generate_rdoc] = true @cmd.options[:generate_ri] = true @@ -112,17 +209,10 @@ class TestGemCommandsInstallCommand < RubyGemTestCase @cmd.options[:args] = [@a2.name] - err = "" - class << err - alias write << - end use_ui @ui do e = assert_raises Gem::SystemExitException do - stderr, $stderr = $stderr, err - begin @cmd.execute - ensure - $stderr = stderr end end assert_equal 0, e.exit_code @@ -136,7 +226,6 @@ class TestGemCommandsInstallCommand < RubyGemTestCase assert_equal "Installing RDoc documentation for #{@a2.full_name}...", out.shift assert out.empty?, out.inspect - assert_match /^Updating class cache with \d+ classes/, err end def test_execute_two |