Skip to content

Instantly share code, notes, and snippets.

@jbpros
Created September 8, 2011 10:17
Show Gist options
  • Save jbpros/1203086 to your computer and use it in GitHub Desktop.
Save jbpros/1203086 to your computer and use it in GitHub Desktop.
Expect yielding a content_for block in a view spec (rspec)
it "yields the footer" do
footer = "the footer contents"
view.content_for(:footer) { footer }
render
rendered.should have_content footer
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment