diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-10-20 17:28:02 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-10-20 17:28:02 -0500 |
commit | cec3f58cb9219e0ba6e5b6abf3c7fe0372d01d1b (patch) | |
tree | 3f11f30b63530274eecafbfc4f7101f417adc876 | |
parent | f093e405a8e10bafa0b5d4621069a0b7ad86c37f (diff) | |
download | bundler-seg-outdated-second-group.tar.gz |
[Outdated] Support --group with the second group for a dependencyseg-outdated-second-group
-rw-r--r-- | lib/bundler/cli/outdated.rb | 2 | ||||
-rw-r--r-- | spec/commands/outdated_spec.rb | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 9e4700ea52..d0639f0e74 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -118,7 +118,7 @@ module Bundler [nil, ordered_groups].flatten.each do |groups| gems = outdated_gems_by_groups[groups] contains_group = if groups - groups.split(",").include?(options[:group]) + groups.split(", ").include?(options[:group]) else options[:group] == "group" end diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb index 0a9e430338..877e648f5d 100644 --- a/spec/commands/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb @@ -135,6 +135,17 @@ RSpec.describe "bundle outdated" do expect(out).to include("activesupport") expect(out).to include("duradura") end + + it "returns a sorted list of outdated gems from one group => 'test'" do + test_group_option("test", 2) + + expect(out).not_to include("===== Group default =====") + expect(out).not_to include("terranova (") + + expect(out).to include("===== Group development, test =====") + expect(out).to include("activesupport") + expect(out).to include("duradura") + end end describe "with --groups option" do |