aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/cmd/list_spec.rb14
-rw-r--r--Library/Homebrew/test/list_test.rb13
2 files changed, 14 insertions, 13 deletions
diff --git a/Library/Homebrew/test/cmd/list_spec.rb b/Library/Homebrew/test/cmd/list_spec.rb
new file mode 100644
index 000000000..df7394d7b
--- /dev/null
+++ b/Library/Homebrew/test/cmd/list_spec.rb
@@ -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
diff --git a/Library/Homebrew/test/list_test.rb b/Library/Homebrew/test/list_test.rb
deleted file mode 100644
index 3c691e3ad..000000000
--- a/Library/Homebrew/test/list_test.rb
+++ /dev/null
@@ -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