Add test for verbose brew outdated output

Split the tests up into quiet and verbose output with contexts.
This commit is contained in:
William Roe 2017-03-27 11:27:48 +01:00
parent 676c4a9e33
commit 755d43d46d

View File

@ -1,11 +1,25 @@
describe "brew outdated", :integration_test do describe "brew outdated", :integration_test do
it "prints outdated Formulae" do context "quiet output" do
setup_test_formula "testball" it "prints outdated Formulae" do
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
expect { brew "outdated" } expect { brew "outdated" }
.to output("testball\n").to_stdout .to output("testball\n").to_stdout
.and not_to_output.to_stderr .and not_to_output.to_stderr
.and be_a_success .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
end end