diff options
Diffstat (limited to 'actionpack/test/abstract_controller/abstract_controller_test.rb')
-rw-r--r-- | actionpack/test/abstract_controller/abstract_controller_test.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/actionpack/test/abstract_controller/abstract_controller_test.rb b/actionpack/test/abstract_controller/abstract_controller_test.rb index 8763ded57e..918062c7db 100644 --- a/actionpack/test/abstract_controller/abstract_controller_test.rb +++ b/actionpack/test/abstract_controller/abstract_controller_test.rb @@ -56,6 +56,14 @@ module AbstractController def naked_render render end + + def rendering_to_body + render_to_body "naked_render.erb" + end + + def rendering_to_string + render_to_string "naked_render.erb" + end end class TestRenderer < ActiveSupport::TestCase @@ -73,6 +81,16 @@ module AbstractController result = Me2.process(:naked_render) assert_equal "Hello from naked_render.erb", result.response_obj[:body] end + + test "rendering to a rack body" do + result = Me2.process(:rendering_to_body) + assert_equal "Hello from naked_render.erb", result.response_obj[:body] + end + + test "rendering to a string" do + result = Me2.process(:rendering_to_string) + assert_equal "Hello from naked_render.erb", result.response_obj[:body] + end end # Test rendering with prefixes |