aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-25 03:30:23 +0100
committerGitHub2017-02-25 03:30:23 +0100
commit213264db538517ac49452b51ddd712b2dd407626 (patch)
tree19d3675c411ee9bcae94375e24e686f5d39be1f6 /Library/Homebrew
parent8927f663f2de2b89ebbb641798f86d065b358885 (diff)
parentd85eb55f1cd36b9573f4a1a5a6e42233eb8c4751 (diff)
downloadbrew-213264db538517ac49452b51ddd712b2dd407626.tar.bz2
Merge pull request #2116 from reitermarkus/spec-list
Convert `brew list` test to spec.
Diffstat (limited to 'Library/Homebrew')
-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