diff options
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 91e0d8cc6..5c166687e 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -492,3 +492,14 @@ end # Simple module to "namespace" all of the API tests module ApiTest end + +# URL helpers do not work with config.threadsafe! +# https://github.com/rspec/rspec-rails/issues/476#issuecomment-4705454 +ActionView::TestCase::TestController.instance_eval do + helper Rails.application.routes.url_helpers +end +ActionView::TestCase::TestController.class_eval do + def _routes + Rails.application.routes + end +end |