On Thursday 19 August 2010, Dylan Markow wrote:
> Is there a way to get to the content captured in a "content_for"
> block through my view specs, or at the very least get my "render"
> call to use the full layout?

Try defining a method like this in your spec

  def content_for(name)
    view.instance_variable_get(:@_content_for)[name]
  end

and then

  content_for(:sidebar).should ...


Michael

-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to