Sha256: 84594b4b26e116871503a45620ab0e552190741be5f052fe2b92ed859af8d8d8

Contents?: true

Size: 655 Bytes

Versions: 10

Compression:

Stored size: 655 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

10 entries across 10 versions & 1 rubygems

Version Path
rubygems-update-3.2.8 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.7 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.6 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.5 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.4 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.3 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.2 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.1 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.0 test/rubygems/test_gem_commands_outdated_command.rb
rubygems-update-3.2.0.rc.2 test/rubygems/test_gem_commands_outdated_command.rb