summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-10-01 16:39:00 +0200
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-10-12 16:46:33 +0200
commita7cec294ac06de02388a71bdef10702e290cacbb (patch)
treec4c80c5dd278ff6146f0e68723e3a7aa6c29bf95
parent73ff5d58831161aa73fbe21e8600c509d63bda8c (diff)
downloadbundler-a7cec294ac06de02388a71bdef10702e290cacbb.tar.gz
Split --verbose option to a separate spec
-rw-r--r--spec/commands/outdated_spec.rb37
1 files changed, 35 insertions, 2 deletions
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index 437e7632ae..8824f7d68c 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -91,10 +91,10 @@ RSpec.describe "bundle outdated" do
update_repo2 { build_gem "activesupport", "3.0" }
update_repo2 { build_gem "terranova", "9" }
- bundle "outdated --verbose"
+ bundle "outdated"
expected_output = <<~TABLE.strip
- Gem Locked Latest Requested Groups Path
+ Gem Locked Latest Requested Groups
activesupport 2.3.5 3.0 = 2.3.5 development, test
terranova 8 9 = 8 default
TABLE
@@ -103,6 +103,39 @@ RSpec.describe "bundle outdated" do
end
end
+ describe "with --verbose option" do
+ it "shows the location of the latest version's gemspec if installed" do
+ bundle! "config set clean false"
+
+ update_repo2 { build_gem "activesupport", "3.0" }
+ update_repo2 { build_gem "terranova", "9" }
+
+ install_gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+
+ gem "terranova", '9'
+ gem 'activesupport', '2.3.5'
+ G
+
+ gemfile <<-G
+ source "#{file_uri_for(gem_repo2)}"
+
+ gem "terranova", '8'
+ gem 'activesupport', '2.3.5'
+ G
+
+ bundle "outdated --verbose"
+
+ expected_output = <<~TABLE.strip
+ Gem Locked Latest Requested Groups Path
+ activesupport 2.3.5 3.0 = 2.3.5 default
+ terranova 8 9 = 8 default #{default_bundle_path("specifications/terranova-9.gemspec")}
+ TABLE
+
+ expect(out).to end_with(expected_output)
+ end
+ end
+
describe "with --group option" do
before do
install_gemfile <<-G