aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/streaming_render_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-22 15:37:38 +0200
committerJosé Valim <jose.valim@gmail.com>2011-09-22 15:37:38 +0200
commit43d27e9105b385f64ec195f60d10ab3d64281bd4 (patch)
tree755829e527a141ba5aa7db852ec16b3cd9cd073a /actionpack/test/template/streaming_render_test.rb
parentc3fa2e9bf89039e90c45336979d17cb0c02a6cd2 (diff)
downloadrails-43d27e9105b385f64ec195f60d10ab3d64281bd4.tar.gz
rails-43d27e9105b385f64ec195f60d10ab3d64281bd4.tar.bz2
rails-43d27e9105b385f64ec195f60d10ab3d64281bd4.zip
Deprecate passing the template handler in the template name.
For example, calling hello.erb is now deprecated. Since Rails 3.0 passing the handler had no effect whatsover. This commit simply deprecates such cases so we can clean up the code in later releases.
Diffstat (limited to 'actionpack/test/template/streaming_render_test.rb')
-rw-r--r--actionpack/test/template/streaming_render_test.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/test/template/streaming_render_test.rb b/actionpack/test/template/streaming_render_test.rb
index 023ce723ed..4d01352b43 100644
--- a/actionpack/test/template/streaming_render_test.rb
+++ b/actionpack/test/template/streaming_render_test.rb
@@ -28,7 +28,7 @@ class FiberedTest < ActiveSupport::TestCase
def test_streaming_works
content = []
- body = render_body(:template => "test/hello_world.erb", :layout => "layouts/yield")
+ body = render_body(:template => "test/hello_world", :layout => "layouts/yield")
body.each do |piece|
content << piece
@@ -42,12 +42,12 @@ class FiberedTest < ActiveSupport::TestCase
end
def test_render_file
- assert_equal "Hello world!", buffered_render(:file => "test/hello_world.erb")
+ assert_equal "Hello world!", buffered_render(:file => "test/hello_world")
end
def test_render_file_with_locals
locals = { :secret => 'in the sauce' }
- assert_equal "The secret is in the sauce\n", buffered_render(:file => "test/render_file_with_locals.erb", :locals => locals)
+ assert_equal "The secret is in the sauce\n", buffered_render(:file => "test/render_file_with_locals", :locals => locals)
end
def test_render_partial
@@ -64,27 +64,27 @@ class FiberedTest < ActiveSupport::TestCase
def test_render_with_layout
assert_equal %(<title></title>\nHello world!\n),
- buffered_render(:template => "test/hello_world.erb", :layout => "layouts/yield")
+ buffered_render(:template => "test/hello_world", :layout => "layouts/yield")
end
def test_render_with_layout_which_has_render_inline
assert_equal %(welcome\nHello world!\n),
- buffered_render(:template => "test/hello_world.erb", :layout => "layouts/yield_with_render_inline_inside")
+ buffered_render(:template => "test/hello_world", :layout => "layouts/yield_with_render_inline_inside")
end
def test_render_with_layout_which_renders_another_partial
assert_equal %(partial html\nHello world!\n),
- buffered_render(:template => "test/hello_world.erb", :layout => "layouts/yield_with_render_partial_inside")
+ buffered_render(:template => "test/hello_world", :layout => "layouts/yield_with_render_partial_inside")
end
def test_render_with_nested_layout
assert_equal %(<title>title</title>\n\n<div id="column">column</div>\n<div id="content">content</div>\n),
- buffered_render(:template => "test/nested_layout.erb", :layout => "layouts/yield")
+ buffered_render(:template => "test/nested_layout", :layout => "layouts/yield")
end
def test_render_with_file_in_layout
assert_equal %(\n<title>title</title>\n\n),
- buffered_render(:template => "test/layout_render_file.erb")
+ buffered_render(:template => "test/layout_render_file")
end
def test_render_with_handler_without_streaming_support