Sha256: 951a2da942dc50a108b9415fbea5c2a0393ce2768f8698f3346e1049a639d0c7
Contents?: true
Size: 777 Bytes
Versions: 11
Compression:
Stored size: 777 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}/contents/#{path}" } 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(:path) { 'README.md' } let(:body) { fixture('repos/content.json') } let(:status) { 200 } it "should get the resources" do subject.get user, repo, path a_get(request_path).should have_been_made end it "should get repository information" do content = subject.get user, repo, path content.name.should == 'README.md' end end
Version data entries
11 entries across 11 versions & 1 rubygems