mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6afbaeb3b
commit
31c94ffeb5
126 changed files with 7610 additions and 3747 deletions
|
@ -31,14 +31,14 @@ class TestKernel < RubyGemTestCase
|
|||
|
||||
def test_gem_redundent
|
||||
assert gem('a', '= 1'), "Should load"
|
||||
assert ! gem('a', '= 1'), "Should not load"
|
||||
refute gem('a', '= 1'), "Should not load"
|
||||
assert_equal 1, $:.select { |p| %r{a-1/lib} =~ p }.size
|
||||
assert_equal 1, $:.select { |p| %r{a-1/bin} =~ p }.size
|
||||
end
|
||||
|
||||
def test_gem_overlapping
|
||||
assert gem('a', '= 1'), "Should load"
|
||||
assert ! gem('a', '>= 1'), "Should not load"
|
||||
refute gem('a', '>= 1'), "Should not load"
|
||||
assert_equal 1, $:.select { |p| %r{a-1/lib} =~ p }.size
|
||||
assert_equal 1, $:.select { |p| %r{a-1/bin} =~ p }.size
|
||||
end
|
||||
|
@ -46,17 +46,19 @@ class TestKernel < RubyGemTestCase
|
|||
def test_gem_conflicting
|
||||
assert gem('a', '= 1'), "Should load"
|
||||
|
||||
ex = assert_raises Gem::Exception do
|
||||
ex = assert_raises Gem::LoadError do
|
||||
gem 'a', '= 2'
|
||||
end
|
||||
|
||||
assert_match(/activate a \(= 2, runtime\)/, ex.message)
|
||||
assert_match(/activated a-1/, ex.message)
|
||||
assert_equal 'a', ex.name
|
||||
assert_equal Gem::Requirement.new('= 2'), ex.version_requirement
|
||||
|
||||
assert $:.any? { |p| %r{a-1/lib} =~ p }
|
||||
assert $:.any? { |p| %r{a-1/bin} =~ p }
|
||||
assert ! $:.any? { |p| %r{a-2/lib} =~ p }
|
||||
assert ! $:.any? { |p| %r{a-2/bin} =~ p }
|
||||
refute $:.any? { |p| %r{a-2/lib} =~ p }
|
||||
refute $:.any? { |p| %r{a-2/bin} =~ p }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue