Is there a way I can write something like a shared behaviour for all
just checks the page responds with a 200 status and has a title, meta
Here’s an idea for a shared behaviour (that only applies if I set views
it manually with it_should_behave_like “a standard layout”):
describe “a standard layout”, :shared => true do
it “should have meta tags” do
it "should have an h1 tag" do do_render response.should have_tag("h1") end
Note that this also sucks because I currently have to define a do_render
calls render with a stringified name of the view I’m spec-ing. I also
feeling that I might want to split this out into a shared behaviour for
controllers that checks if all of its pages respond with a 200 (like a
spider-crawling thing) and the rest should be in a view spec.
I’ve got a feeling this would go in spec_helper.rb, but I’m not sure how
it up for all views and controllers. What’s the simplest way?