summaryrefslogtreecommitdiff
path: root/spec/commands/update_spec.rb
diff options
context:
space:
mode:
authorGrey Baker <greysteil@gmail.com>2018-06-06 21:19:05 +0100
committerGrey Baker <greysteil@gmail.com>2018-06-06 21:19:05 +0100
commitc39a2d3386b5c10b290d1cc60ff0b33a8dfa7c28 (patch)
tree0928cebf169e33db25de5432d28f16bcb2c34569 /spec/commands/update_spec.rb
parent43b4fa97515a30bfcea6b34d171ef6afb56d3146 (diff)
downloadbundler-c39a2d3386b5c10b290d1cc60ff0b33a8dfa7c28.tar.gz
Respect --conservative flag when updating a dependency group
Diffstat (limited to 'spec/commands/update_spec.rb')
-rw-r--r--spec/commands/update_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index af09c145c1..b06eaa47e2 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -189,6 +189,23 @@ RSpec.describe "bundle update" do
expect(the_bundle).not_to include_gems "rack 1.2"
end
+ context "when conservatively updating a group with non-group sub-deps" do
+ it "should update only specified group gems" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "activemerchant", :group => :development
+ gem "activesupport"
+ G
+ update_repo2 do
+ build_gem "activemerchant", "2.0"
+ build_gem "activesupport", "3.0"
+ end
+ bundle "update --conservative --group development"
+ expect(the_bundle).to include_gems "activemerchant 2.0"
+ expect(the_bundle).not_to include_gems "activesupport 3.0"
+ end
+ end
+
context "when there is a source with the same name as a gem in a group" do
before :each do
build_git "foo", :path => lib_path("activesupport")