summaryrefslogtreecommitdiff
path: root/spec/commands/update_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/commands/update_spec.rb')
-rw-r--r--spec/commands/update_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index b0a55ab930..ce3eede732 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -216,6 +216,21 @@ RSpec.describe "bundle update" do
bundle "update --source activesupport"
expect(the_bundle).to include_gems "activesupport 3.0"
end
+
+ context "with unlock_source_unlocks_spec set to false" do
+ before { bundle! "config unlock_source_unlocks_spec false" }
+
+ it "should not update gems not included in the source that happen to have the same name" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "activesupport"
+ G
+ update_repo2 { build_gem "activesupport", "3.0" }
+
+ bundle "update --source activesupport"
+ expect(the_bundle).not_to include_gems "activesupport 3.0"
+ end
+ end
end
context "when there is a child dependency that is also in the gemfile" do