diff options
Diffstat (limited to 'spec/bundler/commands/show_spec.rb')
-rw-r--r-- | spec/bundler/commands/show_spec.rb | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/spec/bundler/commands/show_spec.rb b/spec/bundler/commands/show_spec.rb index 6e1986e35f..6a7d5f267e 100644 --- a/spec/bundler/commands/show_spec.rb +++ b/spec/bundler/commands/show_spec.rb @@ -30,21 +30,11 @@ RSpec.describe "bundle show", :bundler => "< 3" do expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s) end - it "prints deprecation" do - bundle "show rails" - expect(err).to eq("[DEPRECATED] use `bundle info rails` instead of `bundle show rails`") - end - it "prints path if gem exists in bundle (with --paths option)" do bundle "show rails --paths" expect(out).to eq(default_bundle_path("gems", "rails-2.3.2").to_s) end - it "prints deprecation when called with a gem and the --paths option" do - bundle "show rails --paths" - expect(err).to eq("[DEPRECATED] use `bundle info rails --path` instead of `bundle show rails --paths`") - end - it "warns if path no longer exists on disk" do FileUtils.rm_rf(default_bundle_path("gems", "rails-2.3.2")) @@ -59,10 +49,6 @@ RSpec.describe "bundle show", :bundler => "< 3" do expect(out).to eq(root.to_s) end - it "prints deprecation when called with bundler" do - bundle "show bundler" - expect(err).to eq("[DEPRECATED] use `bundle info bundler` instead of `bundle show bundler`") - end it "complains if gem not in bundle" do bundle "show missing" expect(err).to match(/could not find gem 'missing'/i) @@ -79,19 +65,26 @@ RSpec.describe "bundle show", :bundler => "< 3" do expect(gem_list).to eq(gem_list.sort) end - it "prints a deprecation when called with the --paths option" do - bundle "show --paths" + it "prints summary of gems" do + bundle "show --verbose" - expect(err).to eq("[DEPRECATED] use `bundle list` instead of `bundle show --paths`") + expect(out).to include <<~MSG + * actionmailer (2.3.2) + \tSummary: This is just a fake gem for testing + \tHomepage: http://example.com + \tStatus: Up to date + MSG end - it "prints summary of gems" do + it "includes bundler in the summary of gems" do bundle "show --verbose" - expect(out).to include("* actionmailer (2.3.2)") - expect(out).to include("\tSummary: This is just a fake gem for testing") - expect(out).to include("\tHomepage: No website available.") - expect(out).to include("\tStatus: Up to date") + expect(out).to include <<~MSG + * bundler (#{Bundler::VERSION}) + \tSummary: The best way to manage your application's dependencies + \tHomepage: https://bundler.io + \tStatus: Up to date + MSG end end |