Make the tests pass when config.threadsafe! is enabled (#12097).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10910 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user