Sha256: b0e1db126075af8d481af30e546fd14572a1961b23388ce54814fd48ad9c51c6

Contents?: true

Size: 743 Bytes

Versions: 5

Compression:

Stored size: 743 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
require 'rubygems/commands/list_command'

class TestGemCommandsListCommand < RubyGemTestCase

  def setup
    super

    @cmd = Gem::Commands::ListCommand.new

    util_setup_fake_fetcher

    @si = util_setup_spec_fetcher @a1, @a2, @pl1

    @fetcher.data["#{@gem_repo}Marshal.#{Gem.marshal_version}"] = proc do
      raise Gem::RemoteFetcher::FetchError
    end
  end

  def test_execute_installed
    @cmd.handle_options %w[c --installed]

    e = assert_raises Gem::SystemExitException do
      use_ui @ui do
        @cmd.execute
      end
    end

    assert_equal 0, e.exit_code

    assert_equal "true\n", @ui.output

    assert_equal '', @ui.error
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubygems-update-1.3.5 test/test_gem_commands_list_command.rb
rubygems-update-1.3.1 test/test_gem_commands_list_command.rb
rubygems-update-1.3.2 test/test_gem_commands_list_command.rb
rubygems-update-1.3.4 test/test_gem_commands_list_command.rb
rubygems-update-1.3.3 test/test_gem_commands_list_command.rb