Skip to content
Browse files

tests fixed

  • Loading branch information...
1 parent b5da25d commit bd61ed855fa5930f162ae467dcf189ed9c08e33e @tomgi committed Aug 9, 2013
Showing with 11 additions and 4 deletions.
  1. +2 −4 spec/integration/repo_spec.rb
  2. +9 −0 spec/integration/shared.rb
View
6 spec/integration/repo_spec.rb
@@ -29,13 +29,11 @@
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
View
9 spec/integration/shared.rb
@@ -15,6 +15,15 @@
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'),

0 comments on commit bd61ed8

Please sign in to comment.
Something went wrong with that request. Please try again.