[rspec-users] Accessing content_for html in view specs?

David Chelimsky dchelimsky at gmail.com
Mon Jul 16 07:04:26 EDT 2007


On 7/16/07, Marcus Crafter <crafterm at gmail.com> wrote:
> Hi All,
>
> Hope all is going well.
>
> I've got a few views that create some content using 'content_for' blocks
>
> <% content_for :blah do %>
>         .....
> <% end %>
>
> Has anyone worked out a way to be able to access the html that's
> generated inside those blocks?
>
> Since they're not part of the view, have_tag('') seems to miss them,
> and at the moment I can't find a way to be able to access the
> generated content?
>
> Any thoughts, ideas appreciated.

Since have_tag wraps assert_select, you may want to post this to the
rails mailing lists as well.

>
> Cheers,
>
> Marcus
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list