summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-03-28 11:30:01 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-04-05 09:26:26 +0200
commit54387d3586e910cc85f23c097c635d3e804722a8 (patch)
treef948bb8e3c528ca5e893205d1f9f3f0b02d8c7c4
parent698b247ed83a0f03e86c6d6954c380b9eeab8060 (diff)
downloadbundler-54387d3586e910cc85f23c097c635d3e804722a8.tar.gz
Get `bundle show` deprecation cases tested
-rw-r--r--spec/other/major_deprecation_spec.rb30
1 files changed, 24 insertions, 6 deletions
diff --git a/spec/other/major_deprecation_spec.rb b/spec/other/major_deprecation_spec.rb
index 39bba9c3da..6d3d55be0f 100644
--- a/spec/other/major_deprecation_spec.rb
+++ b/spec/other/major_deprecation_spec.rb
@@ -470,16 +470,34 @@ The :gist git source is deprecated, and will be removed in the future. Add this
source "file://#{gem_repo1}"
gem "rack"
G
-
- bundle! :show
end
- it "does not print a deprecation warning", :bundler => "< 2" do
- expect(deprecations).to be_empty
+ context "without flags" do
+ before do
+ bundle! :show
+ end
+
+ it "does not print a deprecation warning", :bundler => "< 2" do
+ expect(deprecations).to be_empty
+ end
+
+ it "prints a deprecation warning recommending `bundle list`", :bundler => "2" do
+ expect(deprecations).to include("use `bundle list` instead of `bundle show`")
+ end
end
- it "prints a deprecation warning", :bundler => "2" do
- expect(deprecations).to include("use `bundle list` instead of `bundle show`")
+ context "with a gem argument" do
+ before do
+ bundle! "show rack"
+ end
+
+ it "does not print a deprecation warning", :bundler => "< 2" do
+ expect(deprecations).to be_empty
+ end
+
+ it "prints a deprecation warning recommending `bundle info`", :bundler => "2" do
+ expect(deprecations).to include("use `bundle info rack` instead of `bundle show rack`")
+ end
end
end