aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-06-19 05:43:07 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-06-19 05:43:07 -0700
commit4d69cdbdd75f5a9594055099770c4c3d0ffeb98d (patch)
treef3053ca4821511674252fa4167964e9ceecabea7 /actionpack
parent23c58941a041af630bfff469230546353706251e (diff)
parente8f9e667e46242cf64e50487385aaa6504359df1 (diff)
downloadrails-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.rb17
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