rails/rails — pull request #9248 by mariovisic (2013-02-11 11:05:33+00:00)
Title: Fix ActionView::TestCase::TestController threadsafe issue

When enabling threadsafe mode in the test environment, all of my helper tests that use url_helpers fail. I get the following error:

> In order to use #url_for, you must include routing helpers explicitly. For instance, `include > Rails.application.routes.url_helpers`

I tried rails 4.0 and my helper tests all pass fine. Both 3.2.11 and the 3-2-stable branch cause the tests to fail.

This issue was originally reported to rspec-rails here: https://github.com/rspec/rspec-rails/issues/476

This patch adds url_helpers to the `ActionView::TestCase::TestController` class. I ran the actionpack tests, they all seem to pass fine.

I would add some tests to cover this functionality but i'm not too sure what's required, if you could let me know, that would be tops.