diff options
author | David Chelimsky <dchelimsky@gmail.com> | 2010-06-18 22:20:10 -0500 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-20 00:26:42 +0200 |
commit | 86002a0dfe45c972a2498e33a6a2a882804603bd (patch) | |
tree | 4bee1bbca84a51392910a8458ee37b90f26514c1 /actionpack/test/template | |
parent | 1f84061c5c271647dc5f7f1311e365e134130e0f (diff) | |
download | rails-86002a0dfe45c972a2498e33a6a2a882804603bd.tar.gz rails-86002a0dfe45c972a2498e33a6a2a882804603bd.tar.bz2 rails-86002a0dfe45c972a2498e33a6a2a882804603bd.zip |
Support render_template in view tests. Useful for specifying which
partials are rendered under different conditions.
[#4903 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/test_case_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb index 9b50ea8a42..c365aec841 100644 --- a/actionpack/test/template/test_case_test.rb +++ b/actionpack/test/template/test_case_test.rb @@ -218,4 +218,12 @@ module ActionView end end end + + class RenderTemplateTest < ActionView::TestCase + test "render template" do + controller.controller_path = "test" + render(:template => "test/calling_partial_with_layout") + assert_template "partial_for_use_in_layout" + end + end end |