Sha256: 1a9194f730ace795ed69e188ed9c5f231b0f7a1d5fcea32778029aacc1f56332
Contents?: true
Size: 932 Bytes
Versions: 4
Compression:
Stored size: 932 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Github::Search, '#repos' do let(:query) { 'tty' } let(:request_path) { "/search/repositories" } before { stub_get(request_path).with(query: {q: query}). to_return(body: body, status: status, headers: {content_type: 'application/json; charset=utf-8'}) } after { reset_authentication_for(subject) } context "resource found" do let(:body) { fixture('search/repos.json') } let(:status) { 200 } it { should respond_to :repos } it "should get the resources" do subject.repos q: query a_get(request_path).with(query: {q: query}).should have_been_made end it "should be a response wrapper" do code = subject.repos q: query code.should be_a Github::ResponseWrapper end it "should get information" do code = subject.repos q: query code.total_count.should == 40 end end end
Version data entries
4 entries across 4 versions & 1 rubygems