# Layout not coming in tests

**URL:** <https://www.ruby-forum.com/t/layout-not-coming-in-tests/182073>\
**Category:** Rails\
**Created:** [January 22, 2010, 10:24am UTC](https://www.ruby-forum.com/t/layout-not-coming-in-tests/182073 "2010-01-22T10:24:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 22, 2010, 10:24am UTC](https://www.ruby-forum.com/t/layout-not-coming-in-tests/182073/1 "2010-01-22T10:24:33Z")

</div>

Hi Champs,

I am not able to see the layout page code in test.log? I have design  
like this:  
TOP  
LEFT Layout RIGHT  
I am rendering this left panel and right panel both as well as based on  
conditions rendering Layout. Now, when i ran my test it gives me nothing  
at the layout page. Strangely, these LEFT, RIGHT and layout are in same  
div… Is there ant solution to it … ?

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 24, 2010, 12:48am UTC](https://www.ruby-forum.com/t/layout-not-coming-in-tests/182073/2 "2010-01-24T00:48:24Z")

</div>

Can you post any code?

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 24, 2010, 12:53am UTC](https://www.ruby-forum.com/t/layout-not-coming-in-tests/182073/3 "2010-01-24T00:53:08Z")

</div>

Besides posting code, make sure when you create scaffolds, that you  
remove the default layout that is created for that particular  
controller’s views. This is probably the biggest mistake most people  
make when having issues with layouts.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [January 24, 2010, 7:06am UTC](https://www.ruby-forum.com/t/layout-not-coming-in-tests/182073/4 "2010-01-24T07:06:37Z")

</div>

Thanks for your replies champs… I have resolved it … The problem was  
that in my layouts stating page i have included html comments… So i  
removed them and it worked for me … 🙂

Cheers …

Alpha B. wrote:

> Besides posting code, make sure when you create scaffolds, that you  
> remove the default layout that is created for that particular  
> controller’s views. This is probably the biggest mistake most people  
> make when having issues with layouts.
