Skip to content

Refactor edition controller test helper into separate concerns#11018

Closed
ryanb-gds wants to merge 1 commit into
mainfrom
controller-test-helper-refactor
Closed

Refactor edition controller test helper into separate concerns#11018
ryanb-gds wants to merge 1 commit into
mainfrom
controller-test-helper-refactor

Conversation

@ryanb-gds
Copy link
Copy Markdown
Contributor

This has two benefits. Firstly, we don't have to navigate a several thousand line helper file to find out what our tests are doing.

Secondly, we now run individual tests from the concerns for a particular test case, e.g. with rails test test/functional/admin/publications_controller_test.rb -n "editing an existing edition should record a RecentEditionOpening", which wasn't possible before as the tests were wrapped in method calls.

This has two benefits. Firstly, we don't have to navigate a several thousand line helper file to find out what our tests are doing.

Secondly, we now run individual tests from the concerns for a particular test case, e.g. with `rails test test/functional/admin/publications_controller_test.rb -n "editing an existing edition should record a RecentEditionOpening"`, which wasn't possible before as the tests were wrapped in method calls.
@ryanb-gds ryanb-gds force-pushed the controller-test-helper-refactor branch from 04215a3 to 25d1428 Compare January 19, 2026 17:26
@ryanb-gds
Copy link
Copy Markdown
Contributor Author

Closing this as nobody can realistically review it, the amount of change is too high. Was really just experimenting to see what Gemini CLI could do.

@ryanb-gds ryanb-gds closed this Feb 2, 2026
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.

1 participant