Sha256: 8994a9ecdb19ee183a8ddd79b599ecde422ada31e783a3ff76c5817d35ac1fff

Contents?: true

Size: 831 Bytes

Versions: 1

Compression:

Stored size: 831 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'helper'

describe Octokit::Client::Pulls do

  before do
    @client = Octokit::Client.new(:login => 'sferik')
  end

  describe ".commits" do

    it "should return all commits" do
      stub_get("commits/list/sferik/rails_admin/master").
        to_return(:body => fixture("v2/commits.json"))
      commits = @client.commits("sferik/rails_admin")
      commits.first.author.login.should == "caboteria"
    end

  end

  describe ".commit" do

    it "should return a commit" do
      stub_get("commits/show/sferik/rails_admin/3cdfabd973bc3caac209cba903cfdb3bf6636bcd").
        to_return(:body => fixture("v2/commit.json"))
      commit = @client.commit("sferik/rails_admin", "3cdfabd973bc3caac209cba903cfdb3bf6636bcd")
      commit.first.author.login.should == "caboteria"
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
octokit-0.6.3 spec/octokit/client/commits_spec.rb