Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RSpec/LetSetup cop in models/account_status_cleanup_policy #28470

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

mjankowski
Copy link
Contributor

I had opened this - #28361 - which was a mix of cop fixing and factory creation reduction.

This PR is JUST the cop-fixing portions of that, which also fix the final exclusion for this rule in the todo. In this case, they were both data setup and were moved to before blocks.

Assuming we're good with this, I'll rebase the other one and we can look at just the factory reduction portions.

Separately -- I know that fabrication gem has something similar to factory_bot traits (I think you do inheritance in fabrication?) which would allow us to make factories which come with associations created when that's desired, instead of needing to make them in before setup like done here. That might be a nice improvement to look at, separate from this ... if there's more than handful of these setups for a given fabrication, it would be a good change.

@ClearlyClaire ClearlyClaire added this pull request to the merge queue Dec 22, 2023
Merged via the queue into mastodon:main with commit bb8077e Dec 22, 2023
30 checks passed
vmstan pushed a commit to vmstan/mastodon that referenced this pull request Jan 5, 2024
@mjankowski mjankowski deleted the final-let-setup branch January 11, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants