diff options
author | José Valim <jose.valim@gmail.com> | 2011-04-16 11:22:36 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-04-16 11:22:36 +0200 |
commit | 3e0aedba909562411b8f369115828a79a7a77a0a (patch) | |
tree | b48f6def55bc754614d4f3310f3c220902a7f4f1 /actionpack/test/template | |
parent | 29078ff8f1561420a405384772c051dc30bdcbf6 (diff) | |
download | rails-3e0aedba909562411b8f369115828a79a7a77a0a.tar.gz rails-3e0aedba909562411b8f369115828a79a7a77a0a.tar.bz2 rails-3e0aedba909562411b8f369115828a79a7a77a0a.zip |
Add more tests, ensure we never yield outside the fiber context and that we swap buffers when moving from parent to child.
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/streaming_render_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/streaming_render_test.rb b/actionpack/test/template/streaming_render_test.rb index 06669bb1ee..754ede9701 100644 --- a/actionpack/test/template/streaming_render_test.rb +++ b/actionpack/test/template/streaming_render_test.rb @@ -86,4 +86,12 @@ class FiberedTest < ActiveSupport::TestCase def test_render_with_handler_without_streaming_support assert_match "<p>This is grand!</p>", buffered_render(:template => "test/hello") end + + def test_render_with_streaming_multiple_yields_provide_and_content_for + assert_equal "Yes, \nthis works\n like a charm.", buffered_render(:template => "test/streaming", :layout => "layouts/streaming") + end + + def test_render_with_streaming_with_fake_yields_and_streaming_buster + assert_equal "This won't look\n good.", buffered_render(:template => "test/streaming_buster", :layout => "layouts/streaming") + end end if defined?(Fiber)
\ No newline at end of file |