From 3aa8f348efd1e7b504c342a2b53a21d6a5eae32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 10 May 2011 16:53:57 +0200 Subject: Fix previous commit by allowing a proc to be given as response_body. This is deprecated and is going to be removed in future releases. --- actionpack/test/dispatch/response_body_is_proc_test.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/response_body_is_proc_test.rb b/actionpack/test/dispatch/response_body_is_proc_test.rb index 86d788b845..fd94832624 100644 --- a/actionpack/test/dispatch/response_body_is_proc_test.rb +++ b/actionpack/test/dispatch/response_body_is_proc_test.rb @@ -3,25 +3,24 @@ require 'abstract_unit' class ResponseBodyIsProcTest < ActionDispatch::IntegrationTest class TestController < ActionController::Base def test - request.session_options[:renew] = true self.response_body = proc { |response, output| - puts caller output.write 'Hello' } end - - def rescue_action(e) raise end end def test_simple_get with_test_route_set do - get '/test' + assert_deprecated do + get '/test' + end assert_response :success assert_equal 'Hello', response.body end end private + def with_test_route_set(options = {}) with_routing do |set| set.draw do -- cgit v1.2.3