summaryrefslogtreecommitdiff
path: root/spec/factories/commits.rb
blob: 36b9645438ab3cd735c30dab244b804af46cd45e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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