summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/show_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-01 12:49:40 +0300
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-09 12:44:10 +0900
commit8f37629519ad330032a38ac0e871b2912ed38a1b (patch)
treebb0529b77583d47993d8b0d608d68896aa3a5298 /spec/bundler/commands/show_spec.rb
parent66508992483ae5d77b56a98427c50c772341c0ac (diff)
Merge bundler master from upstream.
Pick from 8dd59e3ba97eb80a599f8149f31bf40773b69dc0
Diffstat (limited to 'spec/bundler/commands/show_spec.rb')
-rw-r--r--spec/bundler/commands/show_spec.rb37
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