mirror of
https://github.com/tomgi/git_stats.git
synced 2024-11-10 21:27:05 +01:00
21 lines
582 B
Ruby
21 lines
582 B
Ruby
FactoryGirl.define do
|
|
initialize_with { new(attributes) }
|
|
|
|
factory :repo, class: GitStats::GitData::Repo do
|
|
path "repo_path"
|
|
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(:hash) { |i| i }
|
|
sequence(:stamp) { |i| i }
|
|
sequence(:date) { |i| Date.new(i) }
|
|
association :repo, strategy: :build
|
|
association :author, strategy: :build
|
|
end
|
|
end |