From 3f78de67b5827ee47d738a1dc96518f24bbb0129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 29 Aug 2009 17:48:11 +0200 Subject: Ensure that blocks are also handled inside the responder. --- actionpack/test/controller/mime_responds_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/mime_responds_test.rb b/actionpack/test/controller/mime_responds_test.rb index 44536ce54e..93a815adae 100644 --- a/actionpack/test/controller/mime_responds_test.rb +++ b/actionpack/test/controller/mime_responds_test.rb @@ -726,6 +726,13 @@ class RespondWithControllerTest < ActionController::TestCase assert_equal "david", @response.body end + def test_block_inside_respond_with_is_rendered + @controller = InheritedRespondWithController.new + @request.accept = "application/json" + get :index + assert_equal "JSON", @response.body + end + def test_no_double_render_is_raised @request.accept = "text/html" assert_raise ActionView::MissingTemplate do -- cgit v1.2.3