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-04 18:29:27 +0200
commit24db5321edfb9a4407e0c2ff9e40c35cad479649 (patch)
tree45b0d821fef7f2d9064b9f67c626e6f633ce8ce3
parenta3e524a43df8623d4b9b1aa512476eb835f533f3 (diff)
downloadbundler-24db5321edfb9a4407e0c2ff9e40c35cad479649.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