Is it possible to test the use of a given layout using RSpec with Rails, for example I'd like a matcher that does the following:
response.should use_layout('my_layout_name')
I found a use_layout matcher when Googling but it doesn't work as neither the response or controller seem to have a layout property that matcher was looking for.
David Chelimsky posted a good answer over on the Ruby Forum:
response.should render_template("layouts/some_layout")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With