Skip to content

RSpec/UselessDynamicDefinition: Fix offenses in job token specs

Peter Leitzen requested to merge 406761-job-token-specs into master

What does this MR do and why?

This MR adds a missing wrapping context to dynamic spec definitions via .each.

See #406761 (closed) and gitlab-org/ruby/gems/gitlab-styles!172 (merged) for more context.

How to set up and validate locally

bin/rspec spec/models/ci/job_token/scope_spec.rb spec/models/ci/job_token/allowlist_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #406761 (closed)

Edited by Peter Leitzen

Merge request reports