summaryrefslogtreecommitdiff
path: root/spec/commands/outdated_spec.rb
diff options
context:
space:
mode:
authorPeter Retzlaff <peter@playtestcloud.com>2018-05-11 19:54:01 +0200
committerPeter Retzlaff <peter@playtestcloud.com>2018-05-11 19:54:01 +0200
commit63815ea90120716e9f5184bd3f949e5ad061a63d (patch)
treee6528c9b21b69d33d4cef8989f8ad7e494c46633 /spec/commands/outdated_spec.rb
parent22d4ff13b08d3907395b083a708cfe1e66f9d4a6 (diff)
downloadbundler-63815ea90120716e9f5184bd3f949e5ad061a63d.tar.gz
Add spec for new --filter-dependencies flag.
Diffstat (limited to 'spec/commands/outdated_spec.rb')
-rw-r--r--spec/commands/outdated_spec.rb27
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