diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-14 15:29:19 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-09-14 15:29:19 -0700 |
commit | 8e489db9dee1f4cfb0c3a259bd59626d86eacb07 (patch) | |
tree | 9b8ecd63550a327b2d264fca9e40c7801a936c6a /actionpack/test/controller | |
parent | 9808cdfa03b41173b13e03469a0f456d0b975c95 (diff) | |
download | rails-8e489db9dee1f4cfb0c3a259bd59626d86eacb07.tar.gz rails-8e489db9dee1f4cfb0c3a259bd59626d86eacb07.tar.bz2 rails-8e489db9dee1f4cfb0c3a259bd59626d86eacb07.zip |
eagerly allocate the renderer object
this means the reader doesn't need to lock, but does have the added cost
of a new object created for every controller
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/renderer_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/controller/renderer_test.rb b/actionpack/test/controller/renderer_test.rb index b55a25430b..1a273adec4 100644 --- a/actionpack/test/controller/renderer_test.rb +++ b/actionpack/test/controller/renderer_test.rb @@ -1,6 +1,10 @@ require 'abstract_unit' class RendererTest < ActiveSupport::TestCase + test 'action controller base has a renderer' do + assert ActionController::Base.renderer + end + test 'creating with a controller' do controller = CommentsController renderer = ActionController::Renderer.for controller |