2 require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3 require 'rubygems/commands/outdated_command'
5 class TestGemCommandsOutdatedCommand < 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 @fetcher = Gem::FakeFetcher.new
32 Gem::RemoteFetcher.fetcher = @fetcher
34 util_setup_spec_fetcher remote_10, remote_20
36 use_ui @ui do @cmd.execute end
38 assert_equal "foo (0.2 < 2.0)\n", @ui.output
39 assert_equal "", @ui.error