mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Import rubygems 1.5.0 (release candidate @ 09893d9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									b511e1bfbe
								
							
						
					
					
						commit
						934f537b45
					
				
					 87 changed files with 570 additions and 331 deletions
				
			
		| 
						 | 
				
			
			@ -4,10 +4,10 @@
 | 
			
		|||
# File a patch instead and assign it to Ryan Davis or Eric Hodel.
 | 
			
		||||
######################################################################
 | 
			
		||||
 | 
			
		||||
require "test/rubygems/gemutilities"
 | 
			
		||||
require 'rubygems/test_case'
 | 
			
		||||
require 'rubygems/command_manager'
 | 
			
		||||
 | 
			
		||||
class TestGemCommandManager < RubyGemTestCase
 | 
			
		||||
class TestGemCommandManager < Gem::TestCase
 | 
			
		||||
 | 
			
		||||
  def setup
 | 
			
		||||
    super
 | 
			
		||||
| 
						 | 
				
			
			@ -21,7 +21,7 @@ class TestGemCommandManager < RubyGemTestCase
 | 
			
		|||
    Gem.load_env_plugins
 | 
			
		||||
 | 
			
		||||
    use_ui @ui do
 | 
			
		||||
      assert_raises MockGemUi::TermError do
 | 
			
		||||
      assert_raises Gem::MockGemUi::TermError do
 | 
			
		||||
        @command_manager.run 'interrupt'
 | 
			
		||||
      end
 | 
			
		||||
      assert_equal '', ui.output
 | 
			
		||||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ class TestGemCommandManager < RubyGemTestCase
 | 
			
		|||
 | 
			
		||||
    @command_manager.register_command :crash
 | 
			
		||||
    use_ui @ui do
 | 
			
		||||
      assert_raises MockGemUi::TermError do
 | 
			
		||||
      assert_raises Gem::MockGemUi::TermError do
 | 
			
		||||
        @command_manager.run 'crash'
 | 
			
		||||
      end
 | 
			
		||||
      assert_equal '', ui.output
 | 
			
		||||
| 
						 | 
				
			
			@ -50,9 +50,9 @@ class TestGemCommandManager < RubyGemTestCase
 | 
			
		|||
 | 
			
		||||
  def test_process_args_bad_arg
 | 
			
		||||
    use_ui @ui do
 | 
			
		||||
      assert_raises(MockGemUi::TermError) {
 | 
			
		||||
      assert_raises Gem::MockGemUi::TermError do
 | 
			
		||||
        @command_manager.process_args("--bad-arg")
 | 
			
		||||
      }
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    assert_match(/invalid option: --bad-arg/i, @ui.error)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue