Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-05-31 16:43:19 +0300
committerRémy Coutable <remy@rymai.me>2017-06-02 20:06:50 +0300
commit857d039145bccaa81da1e7654e51eee9e4b4823a (patch)
tree5ee5fdc54d98ec7d54fa0f08957dcb7952ff42a4 /spec/factories/commits.rb
parent19ee16a0f85dd4bacddbd066237e62a1bbb7113a (diff)
Lint our factories creation in addition to their build
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/factories/commits.rb')
-rw-r--r--spec/factories/commits.rb9
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