diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-19 18:15:26 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-19 18:15:26 +0000 |
commit | 08837d081d764af01a30d325007c3c9527e383a6 (patch) | |
tree | 227a49d530df51dd8f00972a4637bd568a3ca717 /test/rubygems/test_gem_commands_dependency_command.rb | |
parent | 4394ffe521ca03b22761ce4d4afed6645a62ea3d (diff) | |
download | ruby-08837d081d764af01a30d325007c3c9527e383a6.tar.gz |
Update to RubyGems 1.1.1 r1784 (pre 1.2)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_commands_dependency_command.rb')
-rw-r--r-- | test/rubygems/test_gem_commands_dependency_command.rb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_commands_dependency_command.rb b/test/rubygems/test_gem_commands_dependency_command.rb index 93e772c691..e143110a71 100644 --- a/test/rubygems/test_gem_commands_dependency_command.rb +++ b/test/rubygems/test_gem_commands_dependency_command.rb @@ -30,6 +30,34 @@ class TestGemCommandsDependencyCommand < RubyGemTestCase assert_equal '', @ui.error end + def test_execute_no_args + Gem.source_index = nil + + @cmd.options[:args] = [] + + use_ui @ui do + @cmd.execute + end + + expected = <<-EOF +Gem a-1 + +Gem a-2 + +Gem a_evil-9 + +Gem b-2 + +Gem c-1.2 + +Gem pl-1-x86-linux + + EOF + + assert_equal expected, @ui.output + assert_equal '', @ui.error + end + def test_execute_no_match @cmd.options[:args] = %w[foo] @@ -59,6 +87,30 @@ class TestGemCommandsDependencyCommand < RubyGemTestCase assert_equal '', @ui.error end + def test_execute_regexp + Gem.source_index = nil + + @cmd.options[:args] = %w[/[ab]/] + + use_ui @ui do + @cmd.execute + end + + expected = <<-EOF +Gem a-1 + +Gem a-2 + +Gem a_evil-9 + +Gem b-2 + + EOF + + assert_equal expected, @ui.output + assert_equal '', @ui.error + end + def test_execute_reverse quick_gem 'foo' do |gem| gem.add_dependency 'bar', '> 1' |