diff options
| author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-29 15:46:12 -0800 |
|---|---|---|
| committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-12-29 15:46:12 -0800 |
| commit | b27a3e8da39484d8a02d3b9c1e4dc3cb60ddcce7 (patch) | |
| tree | 372a4af6df43eb8bed19c11e55b2f70907d60507 /actionpack/test/controller/render_other_test.rb | |
| parent | ada895e8cac855a2f248aafdb92457365f062d07 (diff) | |
| parent | b354496bda901cb0af499d6f3dff17a96a834a67 (diff) | |
| download | rails-b27a3e8da39484d8a02d3b9c1e4dc3cb60ddcce7.tar.gz rails-b27a3e8da39484d8a02d3b9c1e4dc3cb60ddcce7.tar.bz2 rails-b27a3e8da39484d8a02d3b9c1e4dc3cb60ddcce7.zip | |
Merge branch 'master' of git://github.com/mikel/rails into mail
Conflicts:
actionmailer/lib/action_mailer.rb
Diffstat (limited to 'actionpack/test/controller/render_other_test.rb')
| -rw-r--r-- | actionpack/test/controller/render_other_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/render_other_test.rb b/actionpack/test/controller/render_other_test.rb index 51c3c55545..dfc4f2db8c 100644 --- a/actionpack/test/controller/render_other_test.rb +++ b/actionpack/test/controller/render_other_test.rb @@ -2,6 +2,11 @@ require 'abstract_unit' require 'controller/fake_models' require 'pathname' +ActionController.add_renderer :simon do |says, options| + self.content_type = Mime::TEXT + self.response_body = "Simon says: #{says}" +end + class RenderOtherTest < ActionController::TestCase class TestController < ActionController::Base protect_from_forgery @@ -109,6 +114,10 @@ class RenderOtherTest < ActionController::TestCase end end + def render_simon_says + render :simon => "foo" + end + private def default_render if @alternate_default_render @@ -240,4 +249,9 @@ class RenderOtherTest < ActionController::TestCase xhr :get, :render_alternate_default assert_equal %(Element.replace("foo", "partial html");), @response.body end + + def test_using_custom_render_option + get :render_simon_says + assert_equal "Simon says: foo", @response.body + end end |
