mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems 2.2.2 prerelease to check fixes to
CI. * test/rubygems: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd950a75b5
commit
ea2a00d785
40 changed files with 663 additions and 109 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