Specing Layouts
16th Jul 2008 | Tags: merb specs
Just a quick little snippet for those trying to write specs for their layout.
Create your spec in spec/views/layout/application.html.erb_spec.html
, and add this class to it:
1
2
3
4
class Layout < Application
layout nil
def application; render; end
end
Then just test it as you would any other ordinary view.