aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cask/cli
diff options
context:
space:
mode:
authorAlexey Alekhin2017-08-26 02:05:35 +0200
committerAlexey Alekhin2017-08-26 02:05:35 +0200
commit29b0c7d7472dc26c8c8913db9a16e996ce68f6d2 (patch)
treeaa94f6c89c13e662456917fbb9b26d4d6d83eaf5 /Library/Homebrew/test/cask/cli
parent68c837f0412f0958817ee2d827b770f26d51bad6 (diff)
downloadbrew-29b0c7d7472dc26c8c8913db9a16e996ce68f6d2.tar.bz2
Added a test for no-macthes output to non-TTY
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
-rw-r--r--Library/Homebrew/test/cask/cli/search_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cask/cli/search_spec.rb b/Library/Homebrew/test/cask/cli/search_spec.rb
index f3b693d99..48a4d556d 100644
--- a/Library/Homebrew/test/cask/cli/search_spec.rb
+++ b/Library/Homebrew/test/cask/cli/search_spec.rb
@@ -41,6 +41,13 @@ describe Hbc::CLI::Search, :cask do
EOS
end
+ it "doesn't output anything to non-TTY stdout when there are no matches" do
+ expect {
+ Hbc::CLI::Search.run("foo-bar-baz")
+ }.to not_to_output.to_stdout
+ .and not_to_output.to_stderr
+ end
+
it "lists all Casks available offline with no search term" do
allow(GitHub).to receive(:search_code).and_raise(GitHub::Error.new("reason"))
expect {