How to test if correct layout was used in controller using RSpec and Rails 3?

Try response. Layout EDIT Sure enough, response. Layout no longer works in Rspec2.

However you can verify the correct layout was rendered using render_template as described on this Rails Forum thread: response. Should render_template("layouts/mylayout") As to the second part of your question, I don't see a way of checking for the absence of a layout. Response.

Should_not render_template("layouts/mylayout") does not appear to work. See this discussion.

1 No there is no such method as layout for response object in RoR3 : NoMethodError (undefined method `layout' for #): – oskarae Oct 21 '10 at 12:21 You're right. See my edited answer. – zetetic Oct 23 '10 at 21:05.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions