diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-23 22:53:26 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-23 22:53:26 +0100 |
commit | f915f9e33903ee474920e24ad12a1625f2ef1c52 (patch) | |
tree | 5b6d41e8a809aeaadbc2c0be59603f5f58b16231 /actionpack/test/abstract/render_test.rb | |
parent | b17e358e3df34c03019e357f693611618092e1d6 (diff) | |
parent | 8ff2fb6f3aa6140f5a8bd018d5919a8a1e707cda (diff) | |
download | rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.tar.gz rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.tar.bz2 rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.zip |
Merge branch 'master' into app
Conflicts:
railties/lib/rails/application.rb
Diffstat (limited to 'actionpack/test/abstract/render_test.rb')
-rw-r--r-- | actionpack/test/abstract/render_test.rb | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/actionpack/test/abstract/render_test.rb b/actionpack/test/abstract/render_test.rb index 4bec44c9ae..ffd430fa86 100644 --- a/actionpack/test/abstract/render_test.rb +++ b/actionpack/test/abstract/render_test.rb @@ -6,9 +6,16 @@ module AbstractController class ControllerRenderer < AbstractController::Base include AbstractController::Rendering + def _prefix + "renderer" + end + self.view_paths = [ActionView::FixtureResolver.new( "default.erb" => "With Default", "template.erb" => "With Template", + "renderer/string.erb" => "With String", + "renderer/symbol.erb" => "With Symbol", + "string/with_path.erb" => "With String With Path", "some/file.erb" => "With File", "template_name.erb" => "With Template Name" )] @@ -33,8 +40,16 @@ module AbstractController render end - def shortcut - render "template" + def string + render "string" + end + + def string_with_path + render "string/with_path" + end + + def symbol + render :symbol end def template_name @@ -77,9 +92,19 @@ module AbstractController assert_equal "With Default", @controller.response_body end - def test_render_template_through_shortcut - @controller.process(:shortcut) - assert_equal "With Template", @controller.response_body + def test_render_string + @controller.process(:string) + assert_equal "With String", @controller.response_body + end + + def test_render_symbol + @controller.process(:symbol) + assert_equal "With Symbol", @controller.response_body + end + + def test_render_string_with_path + @controller.process(:string_with_path) + assert_equal "With String With Path", @controller.response_body end def test_render_template_name |