summaryrefslogtreecommitdiff
path: root/test/rubygems/test_gem_source_git.rb
diff options
context:
space:
mode:
-rw-r--r--test/rubygems/test_gem_source_git.rb39
1 files changed, 39 insertions, 0 deletions
@@ -13,6 +13,14 @@ class TestGemSourceGit < Gem::TestCase
@source = Gem::Source::Git.new @name, @repository, 'master', false
end
def test_checkout
@source.checkout
@@ -96,6 +104,13 @@ class TestGemSourceGit < Gem::TestCase
File.join Gem.dir, 'cache', 'bundler', 'git', "a-#{@hash}"
assert_equal expected, @source.repo_cache_dir
end
def test_rev_parse
@@ -118,6 +133,14 @@ class TestGemSourceGit < Gem::TestCase
refute_equal master_head, source.rev_parse
end
def test_spaceship
git = Gem::Source::Git.new 'a', 'git/a', 'master', false
remote = Gem::Source.new @gem_repo
@@ -165,11 +188,27 @@ class TestGemSourceGit < Gem::TestCase
a_spec = specs.shift
assert_equal source.install_dir, a_spec.full_gem_path
b_spec = specs.shift
assert_equal File.join(source.install_dir, 'b'), b_spec.full_gem_path
end
def test_uri_hash