Sha256: b71f85b9611ace093424dc48f7e484c3529653121ce49309310ed58943c6f7b6

Contents?: true

Size: 736 Bytes

Versions: 7

Compression:

Stored size: 736 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Github::Repos::Statistics, '#contributors' do
  let(:user) { 'peter-murach' }
  let(:repo) { 'github' }
  let(:request_path) { "/repos/#{user}/#{repo}/stats/contributors" }

  before {
    stub_get(request_path).to_return(:body => body)
  }

  context "resource found" do
    let(:body) { fixture('repos/contribs.json') }
    let(:status) { 200 }

    it { expect { subject.contributors }.to raise_error(ArgumentError) }

    it "should get the resources" do
      subject.contributors user, repo
      a_get(request_path).should have_been_made
    end

    it_should_behave_like 'an array of resources' do
      let(:requestable) { subject.contributors user, repo }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
github_api-0.11.3 spec/github/repos/statistics/contributors_spec.rb
github_api-0.11.2 spec/github/repos/statistics/contributors_spec.rb
github_api-0.11.1 spec/github/repos/statistics/contributors_spec.rb
github_api-0.11.0 spec/github/repos/statistics/contributors_spec.rb
github_api-0.10.2 spec/github/repos/statistics/contributors_spec.rb
github_api-0.10.1 spec/github/repos/statistics/contributors_spec.rb
github_api-0.10.0 spec/github/repos/statistics/contributors_spec.rb