I found the file 'actionpack/template/template_test.rb', which shows
how to run simple templates:

  def test_basic_template
    @template = new_template
    assert_equal "Hello", render
  end

  def test_locals
    @template = new_template("<%= my_local %>")
    assert_equal "I'm a local", render(:my_local => "I'm a local")
  end

  def test_restores_buffer
    @template = new_template
    assert_equal "Hello", render
    assert_equal "original", @obj.my_buffer
  end

But not sure how to make it work with the @output_buffer for blocks,
fx when using view helpers that take blocks and such?

<% posts.each do |post| %>
  hello <%= post %>
<% end %>

Where should I look for this? Is this functionality isolated and
demonstrated with test cases somewhere?

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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to