diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-03-27 21:24:21 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-03-27 21:24:21 +0530 |
commit | ae040ed6d8c48bf0cd6d5d6b434d60c9c8c27f81 (patch) | |
tree | 2b83349bd584c94266faa85a3b3fb9e1563fdaba /guides/source/testing.textile | |
parent | e01beb5b3b237c7c6bc8945a58ed85ff879109ec (diff) | |
download | rails-ae040ed6d8c48bf0cd6d5d6b434d60c9c8c27f81.tar.gz rails-ae040ed6d8c48bf0cd6d5d6b434d60c9c8c27f81.tar.bz2 rails-ae040ed6d8c48bf0cd6d5d6b434d60c9c8c27f81.zip |
minor edits in testing guide [ci skip]
Diffstat (limited to 'guides/source/testing.textile')
-rw-r--r-- | guides/source/testing.textile | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/guides/source/testing.textile b/guides/source/testing.textile index c1c7b2f341..60b0aa89b9 100644 --- a/guides/source/testing.textile +++ b/guides/source/testing.textile @@ -524,7 +524,7 @@ You also have access to three instance variables in your functional tests: * +@request+ - The request * +@response+ - The response -h4. Testing Template and Layout Example +h4. Testing Templates and Layouts If you want to make sure that the response rendered the correct template and layout, you can use the +assert_template+ method: @@ -543,13 +543,11 @@ things clearer. On the other hand, you have to include the "layouts" directory n file in this standard layout directory. Hence, <ruby> - assert_template :layout => "application" +assert_template :layout => "application" </ruby> will not work. -<b>Gotcha: Watch out if your view renders any partial</b> - If your view renders any partial, when asserting for the layout, you have to assert for the partial at the same time. Otherwise, assertion will fail. |