diff options
Diffstat (limited to 'Library/Homebrew/test/utils/github_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/utils/github_spec.rb | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/test/utils/github_spec.rb b/Library/Homebrew/test/utils/github_spec.rb new file mode 100644 index 000000000..9b539262f --- /dev/null +++ b/Library/Homebrew/test/utils/github_spec.rb @@ -0,0 +1,13 @@ +require "utils/github" + +describe GitHub do +  describe "::search_code", :needs_network do +    it "searches code" do +      results = subject.search_code("repo:Homebrew/brew", "path:/", "filename:readme", "language:markdown") + +      expect(results.count).to eq(1) +      expect(results.first["name"]).to eq("README.md") +      expect(results.first["path"]).to eq("README.md") +    end +  end +end  | 
