Sha256: 498f738958bacd30029044086e8116432f78499afc930606e135c71613a4846b

Contents?: true

Size: 735 Bytes

Versions: 25

Compression:

Stored size: 735 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  before {
    stub_get(request_path).
      to_return(:body => body, :status => status,
        :headers => {:content_type => "application/json; charset=utf-8"})
  }

  after { reset_authentication_for(subject) }

  let(:body) { fixture('repos/readme.json') }
  let(:status) { 200 }

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

  it "should get readme information" do
    readme = subject.readme user, repo
    readme.name.should == 'README.md'
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
github_api-0.11.3 spec/github/repos/contents/readme_spec.rb
github_api-0.11.2 spec/github/repos/contents/readme_spec.rb
github_api-0.11.1 spec/github/repos/contents/readme_spec.rb
github_api-0.11.0 spec/github/repos/contents/readme_spec.rb
github_api-0.10.2 spec/github/repos/contents/readme_spec.rb
github_api-0.10.1 spec/github/repos/contents/readme_spec.rb
github_api-0.10.0 spec/github/repos/contents/readme_spec.rb
github_api-0.9.7 spec/github/repos/contents/readme_spec.rb
github_api-0.9.6 spec/github/repos/contents/readme_spec.rb
github_api-0.9.5 spec/github/repos/contents/readme_spec.rb
github_api-0.9.4 spec/github/repos/contents/readme_spec.rb
github_api-0.9.3 spec/github/repos/contents/readme_spec.rb
github_api-0.9.2 spec/github/repos/contents/readme_spec.rb
github_api-0.9.1 spec/github/repos/contents/readme_spec.rb
github_api-0.9.0 spec/github/repos/contents/readme_spec.rb
github_api-0.8.11 spec/github/repos/contents/readme_spec.rb
github_api-0.8.10 spec/github/repos/contents/readme_spec.rb
github_api-0.8.9 spec/github/repos/contents/readme_spec.rb
github_api-0.8.8 spec/github/repos/contents/readme_spec.rb
github_api-0.8.7 spec/github/repos/contents/readme_spec.rb