Removed obsolete bin scripts.
[rbx.git] / test / rubygems / test_gem_outdated_command.rb
blobadcc4d198019461602036aa09437d8c0d07c2a58
1 require 'test/unit'
2 require File.join(File.expand_path(File.dirname(__FILE__)), 'gemutilities')
3 require 'rubygems/commands/outdated_command'
5 class TestGemOutdatedCommand < RubyGemTestCase
7   def setup
8     super
10     @cmd = Gem::Commands::OutdatedCommand.new
11   end
13   def test_initialize
14     assert @cmd.handles?(%W[--platform #{Gem::Platform.local}])
15   end
17   def test_execute
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
37   end
39 end