Sha256: ca93c53ef49110786684de3a0a44cb5e58dd1b5d67a44d4a336d596fb21c8633

Contents?: true

Size: 880 Bytes

Versions: 18

Compression:

Stored size: 880 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'integration/shared'

describe GitStats::GitData::Activity do
  include_context "shared"

  let(:activity) { repo.activity }

  it 'should count commits by hour' do
    activity.by_hour.should == {10 => 4, 12 => 3, 13 => 1, 15 => 1, 17 => 1}
  end

  it 'should count commits by day of week' do
    activity.by_wday.should == {0 => 3, 3 => 1, 5 => 5, 6 => 1}
  end

  it 'should count commits by day of week and hour' do
    activity.by_wday_hour.should == {0 => {12 => 2, 13 => 1}, 3 => {15 => 1}, 5 => {10 => 4, 17 => 1}, 6 => {12 => 1}}
  end

  it 'should count commits by month' do
    activity.by_month.should == {10 => 10}
  end

  it 'should count commits by year' do
    activity.by_year.should == {2012 => 10}
  end

  it 'should count commits by year and month' do
    activity.by_year_month.should == {2012 => {10 => 10}}
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
git_stats-1.0.17 spec/integration/activity_spec.rb
git_stats-1.0.16 spec/integration/activity_spec.rb
git_stats-1.0.15 spec/integration/activity_spec.rb
git_stats-1.0.14 spec/integration/activity_spec.rb
git_stats-1.0.13 spec/integration/activity_spec.rb
git_stats-1.0.12 spec/integration/activity_spec.rb
git_stats-1.0.11 spec/integration/activity_spec.rb
git_stats-1.0.10 spec/integration/activity_spec.rb
git_stats-1.0.9 spec/integration/activity_spec.rb
git_stats-1.0.8 spec/integration/activity_spec.rb
git_stats-1.0.7 spec/integration/activity_spec.rb
git_stats-1.0.6 spec/integration/activity_spec.rb
git_stats-1.0.5 spec/integration/activity_spec.rb
git_stats-1.0.4 spec/integration/activity_spec.rb
git_stats-1.0.3 spec/integration/activity_spec.rb
git_stats-1.0.2 spec/integration/activity_spec.rb
git_stats-1.0.1 spec/integration/activity_spec.rb
git_stats-1.0.0 spec/integration/activity_spec.rb