If you read the testing Rails guide you'll notice that they make a brief mention of the assert_routing. That code takes the hash key and composes a route based on the parameters. This doesn't necessarily work for the root, though. In order to do that, you need to compose the route hash from a relative URL. That is what assert_recognizes does for us.