diff options
Diffstat (limited to 'spec/factories/commits.rb')
-rw-r--r-- | spec/factories/commits.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/factories/commits.rb b/spec/factories/commits.rb index 89e260cf65b..36b9645438a 100644 --- a/spec/factories/commits.rb +++ b/spec/factories/commits.rb @@ -4,19 +4,14 @@ 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 - after(:build) do |commit| - allow(commit).to receive(:author).and_return build(:author) - end - trait :without_author do - after(:build) do |commit| - allow(commit).to receive(:author).and_return nil - end + author nil end end end |