aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/lock/git_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/lock/git_spec.rb')
-rw-r--r--spec/bundler/lock/git_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/bundler/lock/git_spec.rb b/spec/bundler/lock/git_spec.rb
index 28d167b773..df9d71fdd6 100644
--- a/spec/bundler/lock/git_spec.rb
+++ b/spec/bundler/lock/git_spec.rb
@@ -22,6 +22,17 @@ RSpec.describe "bundle lock with git gems" do
expect(err).to be_empty
end
+ it "prints a proper error when changing a locked Gemfile to point to a bad branch" do
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo1)}"
+ gem 'foo', :git => "#{lib_path("foo-1.0")}", :branch => "bad"
+ G
+
+ bundle "lock --update foo", :raise_on_error => false
+
+ expect(err).to include("Revision bad does not exist in the repository")
+ end
+
it "locks a git source to the current ref" do
update_git "foo"
bundle :install