Sha256: 37b75789fa1a9590863d5175b35689a482adf1349004c4d300773a58f114e129

Contents?: true

Size: 706 Bytes

Versions: 11

Compression:

Stored size: 706 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  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(:archive_format) { 'tarball' }
  let(:ref) { 'master' }
  let(:body) { '[]' }
  let(:status) { 302 }

  it "should get the resources" do
    subject.archive user, repo, :archive_format => archive_format, :ref => ref
    a_get(request_path).should have_been_made
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
github_api-0.9.0 spec/github/repos/contents/archive_spec.rb
github_api-0.8.11 spec/github/repos/contents/archive_spec.rb
github_api-0.8.10 spec/github/repos/contents/archive_spec.rb
github_api-0.8.9 spec/github/repos/contents/archive_spec.rb
github_api-0.8.8 spec/github/repos/contents/archive_spec.rb
github_api-0.8.7 spec/github/repos/contents/archive_spec.rb
github_api-0.8.6 spec/github/repos/contents/archive_spec.rb
github_api-0.8.5 spec/github/repos/contents/archive_spec.rb
github_api-0.8.4 spec/github/repos/contents/archive_spec.rb
github_api-0.8.3 spec/github/repos/contents/archive_spec.rb
github_api-0.8.2 spec/github/repos/contents/archive_spec.rb