Sha256: 34c7ef02f3a21a4795c3c1c5be44880eef5e8de1e50a0c9b4a5e11a9a896eb94

Contents?: true

Size: 623 Bytes

Versions: 7

Compression:

Stored size: 623 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

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

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

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

Version data entries

7 entries across 7 versions & 1 rubygems

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