Sha256: 9d4e47d806ed2dddf0e00e341b065aadc2e0a05a638584258475fdd64bc4d91d

Contents?: true

Size: 756 Bytes

Versions: 4

Compression:

Stored size: 756 Bytes

Contents

require 'spec_helper'

describe Ginatra::RepoStats do
  let(:repo)       { Ginatra::RepoList.find('test') }
  let(:repo_stats) { Ginatra::RepoStats.new(repo, 'master') }

  it "#license" do
    expect(repo_stats.license).to eq('MIT')
  end

  it "#commits_count" do
    expect(repo_stats.commits_count).to eq(57)
  end

  it "#contributors" do
    contributors = repo_stats.contributors
    expect(contributors).to be_a_kind_of(Array)
    expect(contributors.size).to eq(2)
    expect(contributors.first).to eq(['atmos@atmos.org', { author: 'Corey Donohoe', commits_count: 55 }])
  end

  it "#created_at" do
    created_at = repo_stats.created_at
    expect(created_at).to be_a_kind_of(Time)
    expect(created_at.to_s).to include('2009-03-04')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ginatra-4.1.0 spec/ginatra/repo_stats_spec.rb
ginatra-4.0.2 spec/ginatra/repo_stats_spec.rb
ginatra-4.0.1 spec/ginatra/repo_stats_spec.rb
ginatra-4.0.0 spec/ginatra/repo_stats_spec.rb