mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
* lib/rubygems: RubyGems 2.2.2 which contains the following bug fixes:
http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05 https://bugs.ruby-lang.org/issues/9489 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
39cb784095
commit
9b9d3bac4d
64 changed files with 934 additions and 299 deletions
|
@ -27,6 +27,26 @@ class TestGemSourceGit < Gem::TestCase
|
|||
assert_path_exists File.join @source.install_dir, 'a.gemspec'
|
||||
end
|
||||
|
||||
def test_checkout_local
|
||||
@source.remote = false
|
||||
|
||||
@source.checkout
|
||||
|
||||
install_dir = File.join Gem.dir, 'bundler', 'gems', "a-#{@head[0..11]}"
|
||||
|
||||
refute_path_exists File.join install_dir, 'a.gemspec'
|
||||
end
|
||||
|
||||
def test_checkout_local_cached
|
||||
@source.cache
|
||||
|
||||
@source.remote = false
|
||||
|
||||
@source.checkout
|
||||
|
||||
assert_path_exists File.join @source.install_dir, 'a.gemspec'
|
||||
end
|
||||
|
||||
def test_checkout_submodules
|
||||
source = Gem::Source::Git.new @name, @repository, 'master', true
|
||||
|
||||
|
@ -54,6 +74,14 @@ class TestGemSourceGit < Gem::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_cache_local
|
||||
@source.remote = false
|
||||
|
||||
@source.cache
|
||||
|
||||
refute_path_exists @source.repo_cache_dir
|
||||
end
|
||||
|
||||
def test_dir_shortref
|
||||
@source.cache
|
||||
|
||||
|
@ -99,6 +127,12 @@ class TestGemSourceGit < Gem::TestCase
|
|||
assert_equal expected, @source.install_dir
|
||||
end
|
||||
|
||||
def test_install_dir_local
|
||||
@source.remote = false
|
||||
|
||||
assert_nil @source.install_dir
|
||||
end
|
||||
|
||||
def test_repo_cache_dir
|
||||
expected =
|
||||
File.join Gem.dir, 'cache', 'bundler', 'git', "a-#{@hash}"
|
||||
|
@ -211,6 +245,15 @@ class TestGemSourceGit < Gem::TestCase
|
|||
assert_equal extension_dir, b_spec.extension_dir
|
||||
end
|
||||
|
||||
def test_specs_local
|
||||
source = Gem::Source::Git.new @name, @repository, 'master', true
|
||||
source.remote = false
|
||||
|
||||
capture_io do
|
||||
assert_empty source.specs
|
||||
end
|
||||
end
|
||||
|
||||
def test_uri_hash
|
||||
assert_equal @hash, @source.uri_hash
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue