summaryrefslogtreecommitdiff
path: root/spec/commands/update_spec.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-06-15 16:05:47 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-06-18 20:51:09 -0500
commit8d94491dcebc10e1a354f37501beacea8511272d (patch)
treea86204eb6c8d90c381b1781ab24a65035665abca /spec/commands/update_spec.rb
parent69d18afc202f28ceb98f436c25532d02f9d4c1d6 (diff)
downloadbundler-8d94491dcebc10e1a354f37501beacea8511272d.tar.gz
Add a feature flag for `bundle update —source NAME` not unlocking a gem with that nameseg-update-source-feature-flag
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