Sha256: 14a826d880d87a4ce29082d27859a24f11c5880dd46533465eb4b7d3e3a73c60

Contents?: true

Size: 657 Bytes

Versions: 11

Compression:

Stored size: 657 Bytes

Contents

# frozen_string_literal: true
require 'rubygems/test_case'
require 'rubygems/commands/outdated_command'

class TestGemCommandsOutdatedCommand < Gem::TestCase

  def setup
    super

    @cmd = Gem::Commands::OutdatedCommand.new
  end

  def test_initialize
    assert @cmd.handles?(%W[--platform #{Gem::Platform.local}])
  end

  def test_execute
    spec_fetcher do |fetcher|
      fetcher.download 'foo', '1.0'
      fetcher.download 'foo', '2.0'
      fetcher.gem 'foo', '0.1'
      fetcher.gem 'foo', '0.2'
    end

    use_ui @ui do
      @cmd.execute
    end

    assert_equal "foo (0.2 < 2.0)\n", @ui.output
    assert_equal "", @ui.error
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rubygems-update-3.1.6 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.5 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.0.rc.1 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.4 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.3 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.2 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.1 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.0 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.0.pre3 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.0.pre2 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.1.0.pre1 test/rubygems/test_gem_commands_outdated_command.rb