aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-21 20:09:24 +0100
committerGitHub2017-02-21 20:09:24 +0100
commita5af18380ba4c159796b335c5ac453e3529b57a2 (patch)
tree0d424d30690d6815156bb31a29245d3a6e4173fe
parenta0dca79f0101e2a10499ed8ca193b5863947ea0d (diff)
parent423f22df0033f83a04a9452d2e755a96e830b039 (diff)
downloadbrew-a5af18380ba4c159796b335c5ac453e3529b57a2.tar.bz2
Merge pull request #2078 from reitermarkus/spec-search_remote_tap
Convert `search_remote_tap` test to spec.
-rw-r--r--Library/Homebrew/test/cmd/search_remote_tap_spec.rb19
-rw-r--r--Library/Homebrew/test/search_remote_tap_test.rb19
2 files changed, 19 insertions, 19 deletions
diff --git a/Library/Homebrew/test/cmd/search_remote_tap_spec.rb b/Library/Homebrew/test/cmd/search_remote_tap_spec.rb
new file mode 100644
index 000000000..99c2cc20b
--- /dev/null
+++ b/Library/Homebrew/test/cmd/search_remote_tap_spec.rb
@@ -0,0 +1,19 @@
+require "cmd/search"
+
+describe Homebrew do
+ specify "#search_tap" do
+ json_response = {
+ "tree" => [
+ {
+ "path" => "Formula/not-a-formula.rb",
+ "type" => "blob",
+ },
+ ],
+ }
+
+ allow(GitHub).to receive(:open).and_yield(json_response)
+
+ expect(described_class.search_tap("homebrew", "not-a-tap", "not-a-formula"))
+ .to eq(["homebrew/not-a-tap/not-a-formula"])
+ end
+end
diff --git a/Library/Homebrew/test/search_remote_tap_test.rb b/Library/Homebrew/test/search_remote_tap_test.rb
deleted file mode 100644
index 9dd9ee654..000000000
--- a/Library/Homebrew/test/search_remote_tap_test.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-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