Skip to content

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?

What are the relevant issue numbers?

Closes #42090 (closed)

Edited by Rémy Coutable

Merge request reports