Add RSpec/BeforeAll Rubocop rule
What does this MR do and why?
Related #419784 (closed)
Related #418757 (closed)
Add RSpec/BeforeAllUsage Rubocop rule
Enable the rule for RSpec tests
https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#common-test-setup
As much as possible, do not implement this using before(:all) or before(:context). If you do, you would need to manually clean up the data as those hooks run outside a database transaction.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alina Mihaila