aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMike McQuaid2016-09-25 17:25:50 +0100
committerGitHub2016-09-25 17:25:50 +0100
commit6e5735565b9a31ec2b01e02a479a361189729c22 (patch)
treea00f658c462a1f6ac3f6db63aa8ef534cba17c7d /Library/Homebrew/test
parente5274c0d8103006e06351f18155b89c65ee7fe5d (diff)
parentf732278cda2da4159befa44b5f3cd02f5b956d87 (diff)
downloadbrew-6e5735565b9a31ec2b01e02a479a361189729c22.tar.bz2
Merge pull request #1135 from reitermarkus/fix-search-tap
Fix `search_tap` regex/string matching.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_search_remote_tap.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_search_remote_tap.rb b/Library/Homebrew/test/test_search_remote_tap.rb
new file mode 100644
index 000000000..9dd9ee654
--- /dev/null
+++ b/Library/Homebrew/test/test_search_remote_tap.rb
@@ -0,0 +1,19 @@
+require "testing_env"
+require "cmd/search"
+
+class SearchRemoteTapTests < Homebrew::TestCase
+ def test_search_remote_tap
+ json_response = {
+ "tree" => [
+ {
+ "path" => "Formula/not-a-formula.rb",
+ "type" => "blob",
+ },
+ ],
+ }
+
+ GitHub.stubs(:open).yields(json_response)
+
+ assert_equal ["homebrew/not-a-tap/not-a-formula"], Homebrew.search_tap("homebrew", "not-a-tap", "not-a-formula")
+ end
+end