aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-21 05:13:05 +0100
committerMarkus Reiter2017-02-21 05:15:04 +0100
commit423f22df0033f83a04a9452d2e755a96e830b039 (patch)
tree571781983e895ade06f7e327e6a536c0517f325a
parentbd0a1314c8a2676a69b81ba840fb7ea6e50ae736 (diff)
downloadbrew-423f22df0033f83a04a9452d2e755a96e830b039.tar.bz2
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