From c6cb2dd54dcd1ac098bd84592ffde425ebd9b608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Sun, 28 Apr 2019 09:26:51 +0200 Subject: [PATCH] Fix more specs on an environment with bundler head as a default gem --- lib/bundler/source/metadata.rb | 2 ++ spec/commands/show_spec.rb | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lib/bundler/source/metadata.rb b/lib/bundler/source/metadata.rb index 0c96399b0ec..08678798619 100644 --- a/lib/bundler/source/metadata.rb +++ b/lib/bundler/source/metadata.rb @@ -18,6 +18,8 @@ def specs s.source = self s.authors = ["bundler team"] s.bindir = "exe" + s.homepage = "https://bundler.io" + s.summary = "The best way to manage your application's dependencies" s.executables = %w[bundle] # can't point to the actual gemspec or else the require paths will be wrong s.loaded_from = File.expand_path("..", __FILE__) diff --git a/spec/commands/show_spec.rb b/spec/commands/show_spec.rb index 3ae82f6fb3b..6a7d5f267e4 100644 --- a/spec/commands/show_spec.rb +++ b/spec/commands/show_spec.rb @@ -68,10 +68,23 @@ it "prints 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 + * actionmailer (2.3.2) + \tSummary: This is just a fake gem for testing + \tHomepage: http://example.com + \tStatus: Up to date + MSG + end + + it "includes bundler in the summary of gems" do + bundle "show --verbose" + + 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