Sha256: 983482b94286473a540907f32124250807d520efffe327ec776c9ad8ccff1398

Contents?: true

Size: 866 Bytes

Versions: 6

Compression:

Stored size: 866 Bytes

Contents

# -*- encoding : utf-8 -*-
FactoryGirl.define do
  initialize_with { new(attributes) }

  factory :repo, class: GitStats::GitData::Repo do
    path "repo_path"
    factory :test_repo do
      path 'spec/integration/test_repo'
    end
    factory :test_repo_tree do
      path 'spec/integration/test_repo_tree'
    end
  end

  factory :author, class: GitStats::GitData::Author do
    sequence(:name) { |i| "author#{i}" }
    sequence(:email) { |i| "author#{i}@gmail.com" }
    association :repo, strategy: :build
  end

  factory :commit, class: GitStats::GitData::Commit do
    sequence(:sha) { |i| i }
    sequence(:stamp) { |i| i }
    sequence(:date) { |i| Date.new(i) }
    association :repo, strategy: :build
    association :author, strategy: :build
  end

  factory :tree, class: GitStats::GitData::Tree do
    association :repo, strategy: :build
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
git_stats-1.0.17 spec/factories.rb
git_stats-1.0.16 spec/factories.rb
git_stats-1.0.15 spec/factories.rb
git_stats-1.0.14 spec/factories.rb
git_stats-1.0.13 spec/factories.rb
git_stats-1.0.12 spec/factories.rb