Module

RoutingAssertions

Suite of assertions to test routes generated by Rails and the handling of requests made to them.

Public Methods
assert_generates Asserts that the provided options can be used to generate the provided path. This is the inverse of #assert_recognizes. The extras parameter is used to tell the request the names and values of additional request parameters that would be in a query string. The message parameter allows you to specify a custom error message for assertion failures.
assert_recognizes Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path. Basically, it asserts that Rails recognizes the route given by expected_options.
assert_routing Asserts that path and options match both ways; in other words, it verifies that path generates options and then that options generates path. This essentially combines #assert_recognizes and #assert_generates into one step.
Private Methods
recognized_request_for Recognizes the route for a given path.
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.