Convert brew list test to spec.

This commit is contained in:
Markus Reiter 2017-02-23 06:07:07 +01:00
parent c7121f6be5
commit d85eb55f1c
2 changed files with 14 additions and 13 deletions

View File

@ -0,0 +1,14 @@
describe "brew list", :integration_test do
let(:formulae) { %w[bar foo qux] }
it "prints all installed Formulae" do
formulae.each do |f|
(HOMEBREW_CELLAR/f/"1.0/somedir").mkpath
end
expect { brew "list" }
.to output("#{formulae.join("\n")}\n").to_stdout
.and not_to_output.to_stderr
.and be_a_success
end
end

View File

@ -1,13 +0,0 @@
require "testing_env"
class IntegrationCommandTestList < IntegrationCommandTestCase
def test_list
formulae = %w[bar foo qux]
formulae.each do |f|
(HOMEBREW_CELLAR/"#{f}/1.0/somedir").mkpath
end
assert_equal formulae.join("\n"),
cmd("list")
end
end