diff options
author | Cirdes Henrique <cirdes@gmail.com> | 2016-01-28 17:26:37 -0300 |
---|---|---|
committer | Cirdes Henrique <cirdes@gmail.com> | 2016-01-29 08:05:14 -0300 |
commit | 9096ca93afe111bd0a6feb0d6ebac7de72e422b6 (patch) | |
tree | 01d3815fbdd85c8b4330173e3378a799f0903a78 /spec/commands/outdated_spec.rb | |
parent | a2d40cdde33186ab3bdd42c5080321ae89218a7b (diff) | |
download | bundler-9096ca93afe111bd0a6feb0d6ebac7de72e422b6.tar.gz |
bundle outdated with major and minor options
This feature adds the ability to specify on outdated command to
show only the gems with a major or minor updates
Diffstat (limited to 'spec/commands/outdated_spec.rb')
-rw-r--r-- | spec/commands/outdated_spec.rb | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb index bd6a94fbeb..c0b70c1f11 100644 --- a/spec/commands/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb @@ -180,4 +180,59 @@ describe "bundle outdated" do bundle :outdated expect(out).to include("Installing foo 1.0") end + + describe "with --major option" do + it "only reports gems that have a newer major version" do + update_repo2 do + build_gem "weakling", "0.2.0" + build_gem "activesupport", "3.0" + end + + bundle "outdated --major" + expect(out).to_not include("weakling (newest") + expect(out).to include("activesupport (newest") + end + + it "ignore gems not in semantic version" do + update_repo2 do + build_gem "weakling", "1" + end + + bundle "outdated --major" + expect(out).to include("weakling (newest") + end + end + + describe "with --minor option" do + it "only reports gems that have at least a newer minor version" do + update_repo2 do + build_gem "activesupport", "3.0.0" + build_gem "weakling", "0.2.0" + end + + bundle "outdated --minor" + expect(out).to include("weakling (newest") + expect(out).to include("activesupport (newest") + end + + it "ignore patch version" do + update_repo2 do + build_gem "activesupport", "2.3.6" + build_gem "weakling", "0.0.4" + end + + bundle "outdated --minor" + expect(out).to_not include("weakling (newest") + expect(out).to_not include("activesupport (newest") + end + + it "ignore gems not in semantic version" do + update_repo2 do + build_gem "weakling", "1" + end + + bundle "outdated --minor" + expect(out).to include("weakling (newest") + end + end end |