aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli
diff options
context:
space:
mode:
authorMarkus Reiter2017-07-08 18:26:46 +0200
committerMarkus Reiter2017-07-10 00:09:32 +0200
commit4e26fdfcf6922dca9a82b15697b4c76c6bf9212b (patch)
tree9509a66dcc00b9b8a984e078fd516b64597d2eb1 /Library/Homebrew/test/cask/cli
parentdccdac55a835a22d46c36fe915e6e8cdf43a4adc (diff)
downloadbrew-4e26fdfcf6922dca9a82b15697b4c76c6bf9212b.tar.bz2
Add test for non-TTY `brew cask search`.
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
-rw-r--r--Library/Homebrew/test/cask/cli/search_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cask/cli/search_spec.rb b/Library/Homebrew/test/cask/cli/search_spec.rb
index 4c779cae3..f43610767 100644
--- a/Library/Homebrew/test/cask/cli/search_spec.rb
+++ b/Library/Homebrew/test/cask/cli/search_spec.rb
@@ -13,6 +13,15 @@ describe Hbc::CLI::Search, :cask do
EOS
end
+ it "outputs a plain list when stdout is not a TTY" do
+ expect {
+ Hbc::CLI::Search.run("local")
+ }.to output(<<-EOS.undent).to_stdout
+ local-caffeine
+ local-transmission
+ EOS
+ end
+
it "shows that there are no Casks matching a search term that did not result in anything" do
expect {
Hbc::CLI::Search.run("foo-bar-baz")