mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
4394ffe521
commit
08837d081d
10 changed files with 82 additions and 9 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue