diff options
author | Homu <homu@barosl.com> | 2016-02-08 10:39:55 +0900 |
---|---|---|
committer | Homu <homu@barosl.com> | 2016-02-08 10:39:55 +0900 |
commit | e84fe15ab1f754f0d593b925552e8090e490438b (patch) | |
tree | 464010cacb6302f6710fafd16a803cf8fb763524 /spec | |
parent | a753d0182e6d4d91d7e401e40482c6cec5baadae (diff) | |
parent | 25ea3d23bb6b4cb356b4dfdebe8d9293b682d340 (diff) | |
download | bundler-e84fe15ab1f754f0d593b925552e8090e490438b.tar.gz |
Auto merge of #4280 - RochesterinNYC:add-porcelain-parseable-flag-bundle-outdated, r=indirect
Add --parseable (with --porcelain alias) to `bundle outdated` for minimal output
- This flag changes the output of bundle outdated from:
```
* activesupport (newest 3.0, installed 2.3.5, requested = 2.3.5) in groups "development, test"
```
to
```
activesupport (newest 3.0, installed 2.3.5, requested = 2.3.5)"
```
and removes the extraneous output relating to fetching gem metadata,
version metadata, git updates, and resolving dependencies.
- Addresses bundler/bundler-features#85
Diffstat (limited to 'spec')
-rw-r--r-- | spec/commands/outdated_spec.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb index 5db12f0269..dcdb21ae66 100644 --- a/spec/commands/outdated_spec.rb +++ b/spec/commands/outdated_spec.rb @@ -79,6 +79,43 @@ describe "bundle outdated" do end end + shared_examples_for "a minimal output is desired" do + context "and gems are outdated" do + before do + update_repo2 do + build_gem "activesupport", "3.0" + build_gem "weakling", "0.2" + end + end + + it "outputs a sorted list of outdated gems with a more minimal format" do + minimal_output = "activesupport (newest 3.0, installed 2.3.5, requested = 2.3.5)\n" \ + "weakling (newest 0.2, installed 0.0.3, requested ~> 0.0.1)" + subject + expect(out).to eq(minimal_output) + end + end + + context "and no gems are outdated" do + it "has empty output" do + subject + expect(out).to eq("") + end + end + end + + describe "with --parseable option" do + subject { bundle "outdated --parseable" } + + it_behaves_like "a minimal output is desired" + end + + describe "with aliased --porcelain option" do + subject { bundle "outdated --porcelain" } + + it_behaves_like "a minimal output is desired" + end + describe "with specified gems" do it "returns list of outdated gems" do update_repo2 do |