Merge pull request #2116 from reitermarkus/spec-list
Convert `brew list` test to spec.
This commit is contained in:
commit
213264db53
14
Library/Homebrew/test/cmd/list_spec.rb
Normal file
14
Library/Homebrew/test/cmd/list_spec.rb
Normal 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
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user