mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems 2.4.5.
* test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a0b80a4410
commit
97f80207d0
32 changed files with 458 additions and 103 deletions
|
@ -21,6 +21,30 @@ class TestKernel < Gem::TestCase
|
|||
assert $:.any? { |p| %r{a-1/lib} =~ p }
|
||||
end
|
||||
|
||||
def test_gem_default
|
||||
assert gem('a', '>= 0')
|
||||
|
||||
assert_equal @a2, Gem.loaded_specs['a']
|
||||
end
|
||||
|
||||
def test_gem_default_re_gem
|
||||
assert gem('a', '=1')
|
||||
|
||||
refute gem('a', '>= 0')
|
||||
|
||||
assert_equal @a1, Gem.loaded_specs['a']
|
||||
end
|
||||
|
||||
def test_gem_re_gem_mismatch
|
||||
assert gem('a', '=1')
|
||||
|
||||
assert_raises Gem::LoadError do
|
||||
gem('a', '= 2')
|
||||
end
|
||||
|
||||
assert_equal @a1, Gem.loaded_specs['a']
|
||||
end
|
||||
|
||||
def test_gem_redundant
|
||||
assert gem('a', '= 1'), "Should load"
|
||||
refute gem('a', '= 1'), "Should not load"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue