summaryrefslogtreecommitdiff
path: root/spec/commands/add_spec.rb
diff options
context:
space:
mode:
authorAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2019-10-25 16:23:12 -0300
committerAndré Luis Leal Cardoso Junior <andrehjr@gmail.com>2019-11-04 15:10:40 -0300
commit293ad80da8939f766fe886c7653903f09b6133d8 (patch)
treea2dcff7e730eb7f29271d2cf0960b156167f3021 /spec/commands/add_spec.rb
parent27a01a5480c97990123a05e8122f8c5b7910e427 (diff)
downloadbundler-293ad80da8939f766fe886c7653903f09b6133d8.tar.gz
Make bundle add caches newly added gems when needed.
Diffstat (limited to 'spec/commands/add_spec.rb')
-rw-r--r--spec/commands/add_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/commands/add_spec.rb b/spec/commands/add_spec.rb
index fdfca5d8f2..35fd43d3d2 100644
--- a/spec/commands/add_spec.rb
+++ b/spec/commands/add_spec.rb
@@ -239,4 +239,13 @@ RSpec.describe "bundle add" do
expect(err).not_to include("You may also need to change the version requirement specified in the Gemfile if it's too restrictive")
end
end
+
+ describe "when a gem is added and cache exists" do
+ it "caches all new dependencies added for the specified gem" do
+ bundle! :cache
+
+ bundle "add 'rack' --version=1.0.0"
+ expect(bundled_app("vendor/cache/rack-1.0.0.gem")).to exist
+ end
+ end
end