aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd
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/test/cmd
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/test/cmd')
-rw-r--r--Library/Homebrew/test/cmd/list_spec.rb14
1 files changed, 14 insertions, 0 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