mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Import rubygems 1.6.0 (released version @ 58d8a0b9)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
86bb0af7ea
commit
25a9b62d45
73 changed files with 2408 additions and 719 deletions
|
@ -106,6 +106,45 @@ class TestGemDependency < Gem::TestCase
|
|||
refute_equal dep("pkg", :development), dep("pkg", :runtime), "type"
|
||||
end
|
||||
|
||||
def test_merge
|
||||
a1 = dep 'a', '~> 1.0'
|
||||
a2 = dep 'a', '= 1.0'
|
||||
|
||||
a3 = a1.merge a2
|
||||
|
||||
assert_equal dep('a', '~> 1.0', '= 1.0'), a3
|
||||
end
|
||||
|
||||
def test_merge_default
|
||||
a1 = dep 'a'
|
||||
a2 = dep 'a', '1'
|
||||
|
||||
a3 = a1.merge a2
|
||||
|
||||
assert_equal dep('a', '1'), a3
|
||||
end
|
||||
|
||||
def test_merge_name_mismatch
|
||||
a = dep 'a'
|
||||
b = dep 'b'
|
||||
|
||||
e = assert_raises ArgumentError do
|
||||
a.merge b
|
||||
end
|
||||
|
||||
assert_equal 'a (>= 0) and b (>= 0) have different names',
|
||||
e.message
|
||||
end
|
||||
|
||||
def test_merge_other_default
|
||||
a1 = dep 'a', '1'
|
||||
a2 = dep 'a'
|
||||
|
||||
a3 = a1.merge a2
|
||||
|
||||
assert_equal dep('a', '1'), a3
|
||||
end
|
||||
|
||||
def test_prerelease_eh
|
||||
d = dep "pkg", "= 1"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue