Please sign in to comment.
Improve clarity of routing tests
Move the routes for each test inside the test method so that it's easier to see which routes are applicable to which test. To ensure that each test wasn't invalidated the changes were done by first removing all of the routes, ensuring that all of the tests failed and then adding the routes back to each test one by one. One test for `assert_recognizes` was removed as it wasn't actually testing the defined routes and is now tested more thoroughly in routing_assertions_test.rb. One downside is that the test suite takes about 1s longer due to having to using `method_missing` for handling the url helpers as using `include url_helpers` isn't isolated for each test.
- Loading branch information...
Showing with 1,086 additions and 639 deletions.
- +1,086 −639 actionpack/test/dispatch/routing_test.rb
Oops, something went wrong.