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

Remove usage of assigns in controller specs #30195

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

mjankowski
Copy link
Contributor

Related to #30144 - this is the first half of an attempt to get rid of the rails-controller-testing gem (restores the deprecated assigns and assert_template test features) usage in advance of moving some things out of controller specs and into system specs.

The bulk of the changes here are moving the assertion to about the response body instead of the assigns. For almost all of them there was an obvious way to do this, and I only needed one change to non-spec code (Added dom_id once). There were a few be_instance_of checks that I just removed w/out replacement since there's not an obvious way to do that check w/out assigns, but I'm not sure its particulary useful in the first place.

Can split this up if necessary; and will do a follow-up for assert_template, although that one is more substantial I think.

@mjankowski mjankowski added testing Automated lint and test suites refactoring Improving code quality dependencies Pull requests that update a dependency file labels May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file refactoring Improving code quality testing Automated lint and test suites
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant