[rspec-users] Is testing output within content_for possible?
lists at ruby-forum.com
Sat Apr 19 18:57:13 EDT 2008
I wanted to test that the links below were being rendered in the views.
- content_for :sidebar do
%li= edit_link edit_admin_contact_url(@contact), "Contact"
# view test
it "should have the correct side bar links" do
response.should have_tag("ul.links") do
The above doesn't work. Just to make sure my tests weren't the issue I
removed the content_for block and the tests then passed.
Is there something extra that has to be done to get the content_for
contents to be rendered?
Thanks for the help.
Posted via http://www.ruby-forum.com/.
More information about the rspec-users