diff options
author | Dmitry Vorotilin <d.vorotilin@gmail.com> | 2012-06-16 00:52:22 +0400 |
---|---|---|
committer | Dmitry Vorotilin <d.vorotilin@gmail.com> | 2012-06-16 00:56:03 +0400 |
commit | 4717c2ffc6c2416cfbf5fb560689606eadd3b3c6 (patch) | |
tree | 7f8236e073a62445e7cd42a8022ad0f22442b93f /actionpack | |
parent | 3b1ea3d896a6a1ebefdf3fcd461396ddbf8df230 (diff) | |
download | rails-4717c2ffc6c2416cfbf5fb560689606eadd3b3c6.tar.gz rails-4717c2ffc6c2416cfbf5fb560689606eadd3b3c6.tar.bz2 rails-4717c2ffc6c2416cfbf5fb560689606eadd3b3c6.zip |
Added test for case when view doesn't have logger method when using ActionController::Metal controller.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index b4ef22ecf7..4ad9c64413 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -718,6 +718,14 @@ class TestController < ActionController::Base end end +class MetalTestController < ActionController::Metal + include ActionController::Rendering + + def accessing_logger_in_template + render :inline => "<%= logger.class %>" + end +end + class RenderTest < ActionController::TestCase tests TestController @@ -1583,3 +1591,12 @@ class LastModifiedRenderTest < ActionController::TestCase assert_response :success end end + +class MetalRenderTest < ActionController::TestCase + tests MetalTestController + + def test_access_to_logger_in_view + get :accessing_logger_in_template + assert_equal "NilClass", @response.body + end +end |