gitlab-org--gitlab-foss/spec/factories/commits.rb
Rémy Coutable 857d039145
Lint our factories creation in addition to their build
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-02 19:06:50 +02:00

17 lines
322 B
Ruby

require_relative '../support/repo_helpers'
FactoryGirl.define do
factory :commit do
git_commit RepoHelpers.sample_commit
project factory: :empty_project
author { build(:author) }
initialize_with do
new(git_commit, project)
end
trait :without_author do
author nil
end
end
end