views:

80

answers:

2

I'm trying to test that a view was rendered with a given layout. How can I test which layout was used for the call to render() ?

A: 

Try,

controller.layout.should eql("application")

Rishav Rastogi
There is no controller.layout in rails3 as far as I can tell
lowellk
+1  A: 

David Chelimsky posted a good answer over on the Ruby Forum:

response.should render_template("layouts/some_layout")
Kevin Ansfield