mirror of
https://github.com/tomgi/git_stats.git
synced 2024-12-22 13:32:17 +01:00
tests fixed
This commit is contained in:
parent
b5da25d52c
commit
bd61ed855f
2 changed files with 11 additions and 4 deletions
|
@ -29,13 +29,11 @@ describe GitStats::GitData::Repo do
|
|||
end
|
||||
|
||||
it 'should count files by date' do
|
||||
repo.files_count_by_date.keys.should == commit_dates
|
||||
repo.files_count_by_date.values.should == [1, 2, 2, 3, 3, 4, 5, 5, 6, 6]
|
||||
repo.files_count_by_date.keys == Hash[commit_dates_with_empty.zip [1, 2, 2, 3, 3, 4, 5, 5, 6, 6]]
|
||||
end
|
||||
|
||||
it 'should count lines by date' do
|
||||
repo.lines_count_by_date.keys.should == commit_dates
|
||||
repo.files_count_by_date.values.should == [1, 2, 2, 3, 3, 4, 5, 5, 6, 6]
|
||||
repo.files_count_by_date.values == Hash[commit_dates_with_empty.zip [1, 2, 2, 3, 3, 4, 5, 5, 6, 6]]
|
||||
end
|
||||
|
||||
it 'should count all lines in repo' do
|
||||
|
|
|
@ -15,6 +15,15 @@ shared_context "shared" do
|
|||
DateTime.parse('2012-10-24 15:49:02 +0200'),
|
||||
DateTime.parse('2012-10-26 17:05:25 +0200'),
|
||||
] }
|
||||
let(:commit_dates_with_empty) {[
|
||||
Date.new(2012, 10, 19),
|
||||
Date.new(2012, 10, 20),
|
||||
Date.new(2012, 10, 21),
|
||||
Date.new(2012, 10, 22),
|
||||
Date.new(2012, 10, 23),
|
||||
Date.new(2012, 10, 24),
|
||||
Date.new(2012, 10, 25),
|
||||
]}
|
||||
let(:tg_commit_dates) { [
|
||||
DateTime.parse('2012-10-19 10:44:34 +0200'),
|
||||
DateTime.parse('2012-10-19 10:46:10 +0200'),
|
||||
|
|
Loading…
Reference in a new issue