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

Lazy load ActionController and Routing matchers for ActionController::TestCase #1613

Merged

Conversation

ilianah
Copy link
Contributor

@ilianah ilianah commented Feb 16, 2024

This PR sets up two on_load hooks to include the ActionController and Routing matchers modules into ActionController::TestCase. They run only when ActionController::TestCase is loaded rather than immediately whenever the integrate_with method is called.

This change should improve app booting performance by delaying the inclusion of the matchers until they are actually needed.

@ilianah ilianah force-pushed the lazy-load-action-controller-test-case branch from 0218d01 to 7c2bae6 Compare February 23, 2024 14:25
Copy link
Collaborator

@matsales28 matsales28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@matsales28 matsales28 merged commit 2793b9b into thoughtbot:main Mar 15, 2024
15 checks passed
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.

None yet

3 participants