aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-23 06:07:07 +0100
committerMarkus Reiter2017-02-23 20:58:40 +0100
commitd85eb55f1cd36b9573f4a1a5a6e42233eb8c4751 (patch)
treea98f5072bf7573aad2f2b4877ec7bf1abba76cc1
parentc7121f6be50e44784e3e29114617c29715bd9c0f (diff)
downloadbrew-d85eb55f1cd36b9573f4a1a5a6e42233eb8c4751.tar.bz2
Convert `brew list` test to spec.
-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