Fix Rubocop offense for ProtectedBranches test
What does this MR do and why?
Contributes to #406761 (closed)
Fixes an offense for Rspec/UselessDynamicDefinition in protected_branches_access_control_shared_examples.rb. No user-facing changes.
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.