aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorBrandon Medenwald <brandon@simplymadeapps.com>2016-06-09 08:36:07 -0500
committerSean Griffin <sean@seantheprogrammer.com>2016-06-09 09:36:07 -0400
commitf12c42fff2e0719a95477e40c6be24baeee3b9bd (patch)
treea486385415e22bb765fcb09162d7a32d032487f4 /actionpack/test/controller
parent6990fd3e2a9d59fde83e9bd34697641c44cb1674 (diff)
downloadrails-f12c42fff2e0719a95477e40c6be24baeee3b9bd.tar.gz
rails-f12c42fff2e0719a95477e40c6be24baeee3b9bd.tar.bz2
rails-f12c42fff2e0719a95477e40c6be24baeee3b9bd.zip
render_to_string Regression Outside of Real Requests in Rails 5.0.0.rc1 (#25308)
* Restore the functionality of PR#14129, but do so with not nil to better indicate the purpose of the conditional * Add a test when render_to_string called on ActionController::Base.new()
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/render_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb
index f42efd35af..8d3134630d 100644
--- a/actionpack/test/controller/render_test.rb
+++ b/actionpack/test/controller/render_test.rb
@@ -564,6 +564,13 @@ class MetalRenderTest < ActionController::TestCase
end
end
+class ActionControllerBaseRenderTest < ActionController::TestCase
+ def test_direct_render_to_string
+ ac = ActionController::Base.new()
+ assert_equal "Hello world!", ac.render_to_string(template: 'test/hello_world')
+ end
+end
+
class ImplicitRenderTest < ActionController::TestCase
tests ImplicitRenderTestController