Sha256: 51c7effa630b0db9d88cfff12227312978ed3e40d12c1e6b2b77d57b2e313037

Contents?: true

Size: 594 Bytes

Versions: 7

Compression:

Stored size: 594 Bytes

Contents

#!/usr/bin/env ruby

require 'test/unit'
require 'rubygems/cmd_manager'
require 'rubygems/user_interaction'
require 'test/mockgemui'

class TestCheckCommand < Test::Unit::TestCase
  include Gem::DefaultUserInteraction

  def setup
    @cm = Gem::CommandManager.new
    @cmd = @cm['check']
  end

  def test_create
    assert_equal "check", @cmd.command
    assert_equal "gem check", @cmd.program_name
    assert_match /Check/, @cmd.summary
  end

  def test_invoke_help
    use_ui(MockGemUi.new) do 
      assert ! @cmd.invoke('--help')
      assert_match /Usage:/, ui.output
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rubygems-update-0.8.10 test/test_check_command.rb
rubygems-update-0.8.5 test/test_check_command.rb
rubygems-update-0.8.3 test/test_check_command.rb
rubygems-update-0.8.8 test/test_check_command.rb
rubygems-update-0.8.11 test/test_check_command.rb
rubygems-update-0.8.4 test/test_check_command.rb
rubygems-update-0.8.6 test/test_check_command.rb