Null Null Dev
2007-Jun-18 10:42 UTC
How to test "content_for" chunks with functional tests?
Basically, we have an application layout that demands some content for, e.g. the sidebar... during functional testing, we want to assert that our views properly provide this content. Example: - application.rhtml has stuff like "yield :title", "yield :sidebar", etc. - views contain "content_for :title", "content_for :sidebar", etc. Question: - When writing functional tests, is there a way to test that the views properly call "content_for :sidebar", i.e. that "yield :sidebar" in the layout does not result in an empty string? I''m rather new to Rails, just started using functional tests a few days ago... despite much searching, I couldn''t find a solution to the issues above. Any hints are greatly appreciated. -- Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---