summaryrefslogtreecommitdiff
path: root/spec/other
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-20 21:30:31 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-05 09:26:27 +0200
commitbdc78428589547aec003e965302f1fcf985f18fa (patch)
tree21fa6a66c52520c731009fb183037cdc4132af29 /spec/other
parent54387d3586e910cc85f23c097c635d3e804722a8 (diff)
downloadbundler-bdc78428589547aec003e965302f1fcf985f18fa.tar.gz
Print a better messages on undocumented flags
Inform about complete removal when `bundle show --outdated` and `bundle show --verbose`.
Diffstat (limited to 'spec/other')
-rw-r--r--spec/other/major_deprecation_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 6d3d55be0f..3d79a51b94 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -486,6 +486,34 @@ The :gist git source is deprecated, and will be removed in the future. Add this
end
end
+ context "with --outdated flag" do
+ before do
+ bundle! "show --outdated"
+ end
+
+ it "does not print a deprecation warning", :bundler => "< 2" do
+ expect(deprecations).to be_empty
+ end
+
+ it "prints a deprecation warning informing about its removal", :bundler => "2" do
+ expect(deprecations).to include("the `--outdated` flag to `bundle show` was undocumented and will be removed without replacement")
+ end
+ end
+
+ context "with --verbose flag" do
+ before do
+ bundle! "show --verbose"
+ end
+
+ it "does not print a deprecation warning", :bundler => "< 2" do
+ expect(deprecations).to be_empty
+ end
+
+ it "prints a deprecation warning informing about its removal", :bundler => "2" do
+ expect(deprecations).to include("the `--verbose` flag to `bundle show` was undocumented and will be removed without replacement")
+ end
+ end
+
context "with a gem argument" do
before do
bundle! "show rack"