diff options
Diffstat (limited to 'actionpack/test/template/fibered_render_test.rb')
-rw-r--r-- | actionpack/test/template/fibered_render_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/actionpack/test/template/fibered_render_test.rb b/actionpack/test/template/fibered_render_test.rb new file mode 100644 index 0000000000..f62af10812 --- /dev/null +++ b/actionpack/test/template/fibered_render_test.rb @@ -0,0 +1,27 @@ +# encoding: utf-8 +require 'abstract_unit' +require 'controller/fake_models' + +class TestController < ActionController::Base +end + + +class FiberedTest < ActiveSupport::TestCase + + def setup + view_paths = ActionController::Base.view_paths + @assigns = { :secret => 'in the sauce' } + @view = ActionView::Base.new(view_paths, @assigns) + @view.magic_medicine = true + @controller_view = TestController.new.view_context + end + + def test_render_template + assert_equal "Hello world!", @view.render(:template => "test/hello_world") + end + + def test_render_with_layout + assert_equal %(<title></title>\nHello world!\n), + @view.render(:template => "test/hello_world.erb", :layout => "layouts/yield") + end +end if defined?(Fiber)
\ No newline at end of file |