aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_source_git.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/rubygems/test_gem_source_git.rb')
-rw-r--r--test/rubygems/test_gem_source_git.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_source_git.rb b/test/rubygems/test_gem_source_git.rb
index cf5f088c03..4b1c65a51b 100644
--- a/test/rubygems/test_gem_source_git.rb
+++ b/test/rubygems/test_gem_source_git.rb
@@ -180,6 +180,17 @@ class TestGemSourceGit < Gem::TestCase
source.cache
refute_equal master_head, source.rev_parse
+
+ source = Gem::Source::Git.new @name, @repository, 'nonexistent', false
+
+ source.cache
+
+ e = assert_raises Gem::Exception do
+ source.rev_parse
+ end
+
+ assert_equal "unable to find reference nonexistent in #{@repository}",
+ e.message
end
def test_root_dir