diff options
-rw-r--r-- | spec/commands/outdated_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb index 877e648f5d..a25ca06dcf 100644 --- a/spec/commands/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb @@ -764,4 +764,31 @@ RSpec.describe "bundle outdated" do end end end + + describe "with --filter-dependencies" do + it "does not report outdated dependent gems" do + build_repo4 do + build_gem "weakling", %w[0.2 0.3] do |s| + s.add_dependency "bar", "~> 2.1" + end + build_gem "bar", %w[2.1 2.2] + end + + install_gemfile <<-G + source "file://#{gem_repo4}" + gem 'weakling', '0.2' + gem 'bar', '2.1' + G + + gemfile <<-G + source "file://#{gem_repo4}" + gem 'weakling' + G + + bundle "outdated --filter-dependencies" + + expect(out).to include("weakling (newest 0.3") + expect(out).not_to include("bar (newest 2.2") + end + end end |