Resolve "Create cop for FactoryBot methods used in migration specs"
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5186
What does this MR do?
This introduces a new FactoriesInMigrationSpecs
RuboCop cop to prevent the use of FactoryBot#build/build_list/create/create_list
in migration specs, as this is often problematic.
Are there points in the code the reviewer needs to double check?
For now, all the current offenses have been ignored, but the new ones should be introduced.
Does this MR meet the acceptance criteria?
-
Documentation created/updated -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes #42090 (closed)
Edited by Rémy Coutable