diff options
| author | William Roe | 2017-03-27 11:27:48 +0100 |
|---|---|---|
| committer | William Roe | 2017-03-27 11:27:48 +0100 |
| commit | 755d43d46dc20b9e646909e08de482141de83777 (patch) | |
| tree | a1a9a0ed409560ef60f83550247c66c34505ba06 /Library/Homebrew | |
| parent | 676c4a9e33672cd6035ef9225f5d3f9e9d63f810 (diff) | |
| download | brew-755d43d46dc20b9e646909e08de482141de83777.tar.bz2 | |
Add test for verbose brew outdated output
Split the tests up into quiet and verbose output with contexts.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/test/cmd/outdated_spec.rb | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/Library/Homebrew/test/cmd/outdated_spec.rb b/Library/Homebrew/test/cmd/outdated_spec.rb index 2ce0825e8..8e53d84ee 100644 --- a/Library/Homebrew/test/cmd/outdated_spec.rb +++ b/Library/Homebrew/test/cmd/outdated_spec.rb @@ -1,11 +1,25 @@ describe "brew outdated", :integration_test do - it "prints outdated Formulae" do - setup_test_formula "testball" - (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath + context "quiet output" do + it "prints outdated Formulae" do + setup_test_formula "testball" + (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath - expect { brew "outdated" } - .to output("testball\n").to_stdout - .and not_to_output.to_stderr - .and be_a_success + expect { brew "outdated" } + .to output("testball\n").to_stdout + .and not_to_output.to_stderr + .and be_a_success + end + end + + context "verbose output" do + it "prints out the installed and newer versions" do + setup_test_formula "testball" + (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath + + expect { brew "outdated", "--verbose" } + .to output("testball (0.0.1) < 0.1\n").to_stdout + .and not_to_output.to_stderr + .and be_a_success + end end end |
