From b06fceda57ea8306e130ba11ccb2bd71f6907c23 Mon Sep 17 00:00:00 2001 From: Ben Muschol Date: Fri, 11 Aug 2017 15:49:57 -0400 Subject: Add a test --- Library/Homebrew/test/cmd/search_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Library/Homebrew/test/cmd') diff --git a/Library/Homebrew/test/cmd/search_spec.rb b/Library/Homebrew/test/cmd/search_spec.rb index bd2056a48..84cc24d41 100644 --- a/Library/Homebrew/test/cmd/search_spec.rb +++ b/Library/Homebrew/test/cmd/search_spec.rb @@ -1,6 +1,7 @@ describe "brew search", :integration_test do before(:each) do setup_test_formula "testball" + setup_remote_tap "caskroom/cask/test" end it "lists all available Formulae when no argument is given" do @@ -24,6 +25,13 @@ describe "brew search", :integration_test do .and be_a_success end + it "falls back to a tap search when no formula is found" do + expect { brew "search", "caskroom/cask/firefox" } + .to output(/firefox/).to_stdout + .and not_to_output.to_stderr + .and be_a_success + end + describe "--desc" do let(:desc_cache) { HOMEBREW_CACHE/"desc_cache.json" } -- cgit v1.2.3