thoughtbot / shoulda-matchers

Simple one-liner tests for common Rails functionality
https://matchers.shoulda.io
MIT License
3.5k stars 911 forks source link

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

Closed ilianah closed 5 months ago

ilianah commented 6 months ago

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.