diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-06-19 05:43:07 -0700 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-06-19 05:43:07 -0700 |
commit | 4d69cdbdd75f5a9594055099770c4c3d0ffeb98d (patch) | |
tree | f3053ca4821511674252fa4167964e9ceecabea7 /actionpack | |
parent | 23c58941a041af630bfff469230546353706251e (diff) | |
parent | e8f9e667e46242cf64e50487385aaa6504359df1 (diff) | |
download | rails-4d69cdbdd75f5a9594055099770c4c3d0ffeb98d.tar.gz rails-4d69cdbdd75f5a9594055099770c4c3d0ffeb98d.tar.bz2 rails-4d69cdbdd75f5a9594055099770c4c3d0ffeb98d.zip |
Merge pull request #6777 from route/logger_in_metal_tests
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 e9cfda45a9..4a795de5a2 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -730,6 +730,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 @@ -1617,3 +1625,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 |