mirror of
https://github.com/tomgi/git_stats.git
synced 2024-09-21 00:41:29 +02:00
15 lines
560 B
Ruby
15 lines
560 B
Ruby
require 'spec_helper'
|
|
|
|
describe GitStats::GitData::Author do
|
|
let(:my_commits) { Hash[10.times.map { |i| ["my #{i}", double("my_commit #{i}", :author => author)] }] }
|
|
let(:other_commits) { Hash[10.times.map { |i| ["other #{i}", double("other_commit #{i}", :author => 42)] }] }
|
|
let(:repo) { double("repo") }
|
|
let(:author) { GitStats::GitData::Author.new(repo: repo) }
|
|
before { repo.stub(:commits => my_commits.merge(other_commits)) }
|
|
|
|
it 'commits should give repo commits filtered to this author' do
|
|
author.commits.should == my_commits
|
|
end
|
|
|
|
|
|
end |