Sha256: d40f127801e20ee6c4a085fba667457020ef3486694da5d82c933bf502b9c2ab
Contents?: true
Size: 1.09 KB
Versions: 11
Compression:
Stored size: 1.09 KB
Contents
# encoding: utf-8 require 'spec_helper' describe Github::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 Hashie::Mash 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
11 entries across 11 versions & 1 rubygems