summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-03 11:19:51 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-03 11:19:51 +0100
commit7339bd887126c889844aa821c81cc15c6e2f12d7 (patch)
tree97bfe0ae2d52d3d38dc419dfba1d1678ffe5a4cf
parent05e144939dcc1d91ec85b5d7a126f18aa830e6bf (diff)
downloadbundler-bundle_update.tar.gz
Add an extra specbundle_update
I wanted to make sure that `bundle update` no longer updates the whole bundle after we change the behavior, since I thought maybe I needed an early return after the help text was printed. After writing the test I realized that the `help` command is exec'ing, so no, we don't need the early return. But I guess the test doesn't do any harm.
-rw-r--r--spec/commands/update_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index da4c68fc3b..f7c1aa0955 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -12,7 +12,7 @@ RSpec.describe "bundle update" do
G
end
- describe "with no arguments", :bundler => "< 2" do
+ describe "with no arguments", :bundler => "< 3" do
it "updates the entire bundle" do
update_repo2 do
build_gem "activesupport", "3.0"
@@ -35,6 +35,18 @@ RSpec.describe "bundle update" do
end
end
+ describe "with no arguments", :bundler => "3" do
+ it "does not update the entire bundle" do
+ update_repo2 do
+ build_gem "activesupport", "3.0"
+ end
+
+ bundle "update"
+ expect(out).not_to include("Bundle updated!")
+ expect(the_bundle).not_to include_gems "rack 1.2", "activesupport 3.0"
+ end
+ end
+
describe "with --all", :bundler => "2" do
it "updates the entire bundle" do
update_repo2 do