Sha256: 455ecc1ea570758540d5cffd97a3ec065f3d5b7da6c1f0c44ca5b15058475371
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
# encoding: utf-8 require 'spec_helper' describe Github::Client::Repos, '#branch' do let(:user) { 'peter-murach' } let(:repo) { 'github' } let(:request_path) { "/repos/#{user}/#{repo}/branches/#{branch}" } let(:branch) { 'master' } after { reset_authentication_for subject } before { stub_get(request_path).to_return(:body => body, :status => status, :headers => {:content_type => "application/json; charset=utf-8"}) } context "resource found" do let(:body) { fixture('repos/branch.json') } let(:status) { 200 } it "should find resources" do subject.branch user, repo, branch a_get(request_path).should have_been_made end it "should return repository mash" do repo_branch = subject.branch user, repo, branch repo_branch.should be_a Github::ResponseWrapper end it "should get repository branch information" do repo_branch = subject.branch user, repo, branch repo_branch.name.should == 'master' end end it_should_behave_like 'request failure' do let(:requestable) { subject.branch user, repo, branch } end end # branch
Version data entries
4 entries across 4 versions & 1 rubygems