summaryrefslogtreecommitdiff
path: root/spec/commands
diff options
context:
space:
mode:
Diffstat (limited to 'spec/commands')
-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