summaryrefslogtreecommitdiff
path: root/spec/commands/update_spec.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-06-14 10:10:36 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-06-14 16:09:40 -0500
commite9cf5df06df18255ff322ba770d19abc4a76db75 (patch)
tree052807f4c70ec157b8a007c6a1aff5a992808d05 /spec/commands/update_spec.rb
parentd34a2a79fcb21ef6feca54f0fd97369125f53f1c (diff)
downloadbundler-e9cf5df06df18255ff322ba770d19abc4a76db75.tar.gz
Add `—all` flag to `bundle update`
And require it on 2+
Diffstat (limited to 'spec/commands/update_spec.rb')
-rw-r--r--spec/commands/update_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/commands/update_spec.rb b/spec/commands/update_spec.rb
index b278036a12..b0a55ab930 100644
--- a/spec/commands/update_spec.rb
+++ b/spec/commands/update_spec.rb
@@ -34,6 +34,28 @@ RSpec.describe "bundle update" do
end
end
+ context "when update_requires_all_flag is set" do
+ before { bundle! "config update_requires_all_flag true" }
+
+ it "errors when passed nothing" do
+ install_gemfile! ""
+ bundle :update
+ expect(out).to eq("To update everything, pass the `--all` flag.")
+ end
+
+ it "errors when passed --all and another option" do
+ install_gemfile! ""
+ bundle "update --all foo"
+ expect(out).to eq("Cannot specify --all along with specific options.")
+ end
+
+ it "updates everything when passed --all" do
+ install_gemfile! ""
+ bundle "update --all"
+ expect(out).to include("Bundle updated!")
+ end
+ end
+
describe "--quiet argument" do
it "hides UI messages" do
bundle "update --quiet"