Permalink
Browse files

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...
1 parent 3da1649 commit be2a3b0a9319683e25ce06dda55b6d12a0c806ed @pixeltrix pixeltrix committed Nov 26, 2012
Showing with 1,086 additions and 639 deletions.
  1. +1,086 −639 actionpack/test/dispatch/routing_test.rb
Oops, something went wrong.

0 comments on commit be2a3b0

Please sign in to comment.