diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-10 16:53:57 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-10 16:53:57 +0200 |
commit | 3aa8f348efd1e7b504c342a2b53a21d6a5eae32e (patch) | |
tree | e63879412f79a23c8e453453824ff870cbb3c463 /actionpack/test/dispatch | |
parent | 4d5ce4738b6f8c1d1abcd128349d3eaac1fffcde (diff) | |
download | rails-3aa8f348efd1e7b504c342a2b53a21d6a5eae32e.tar.gz rails-3aa8f348efd1e7b504c342a2b53a21d6a5eae32e.tar.bz2 rails-3aa8f348efd1e7b504c342a2b53a21d6a5eae32e.zip |
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.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/response_body_is_proc_test.rb | 9 |
1 files changed, 4 insertions, 5 deletions
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 |