aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-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 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