2 require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3 require 'rubygems/commands/outdated_command'
5 class TestGemOutdatedCommand < RubyGemTestCase
10 @cmd = Gem::Commands::OutdatedCommand.new
14 assert @cmd.handles?(%W[--platform #{Gem::Platform.local}])
18 local_01 = quick_gem 'foo', '0.1'
19 local_02 = quick_gem 'foo', '0.2'
20 remote_10 = quick_gem 'foo', '1.0'
21 remote_20 = quick_gem 'foo', '2.0'
23 remote_spec_file = File.join @gemhome, 'specifications',
24 remote_10.full_name + ".gemspec"
25 FileUtils.rm remote_spec_file
27 remote_spec_file = File.join @gemhome, 'specifications',
28 remote_20.full_name + ".gemspec"
29 FileUtils.rm remote_spec_file
31 util_setup_source_info_cache remote_10, remote_20
33 use_ui @ui do @cmd.execute end
35 assert_equal "foo (0.2 < 2.0)\n", @ui.output
36 assert_equal "", @ui.error