[CE] Reduce diff with EE in `spec/helpers`
This ports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10477 to CE.
What does this MR do?
This reduces the CE/EE diff in spec/helpers
.
What are the relevant issue numbers?
Related to https://gitlab.com/gitlab-org/gitlab-ee/issues/9506.
Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/10143.
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides