diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-05-02 15:37:29 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-05-02 15:37:29 -0500 |
commit | 24affdc88c4a4af03ce1ec5b23c3def18b90effe (patch) | |
tree | 46af2860b8944f85b14410884ddeb95d2387673a /actionpack/test/controller/helper_test.rb | |
parent | f32cf44870549c6cc5b6e6c84cffc1facf6ec38e (diff) | |
download | rails-24affdc88c4a4af03ce1ec5b23c3def18b90effe.tar.gz rails-24affdc88c4a4af03ce1ec5b23c3def18b90effe.tar.bz2 rails-24affdc88c4a4af03ce1ec5b23c3def18b90effe.zip |
Deprecate Controller.process interface
Diffstat (limited to 'actionpack/test/controller/helper_test.rb')
-rw-r--r-- | actionpack/test/controller/helper_test.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/actionpack/test/controller/helper_test.rb b/actionpack/test/controller/helper_test.rb index 58addc123d..e72bce1791 100644 --- a/actionpack/test/controller/helper_test.rb +++ b/actionpack/test/controller/helper_test.rb @@ -102,19 +102,19 @@ class HelperTest < Test::Unit::TestCase end def test_helper_for_nested_controller - request = ActionController::TestRequest.new - response = ActionController::TestResponse.new + request = ActionController::TestRequest.new request.action = 'render_hello_world' - assert_equal 'hello: Iz guuut!', Fun::GamesController.process(request, response).body + response = Rack::MockResponse.new(*Fun::GamesController.call(request.env)) + assert_equal 'hello: Iz guuut!', response.body end def test_helper_for_acronym_controller - request = ActionController::TestRequest.new - response = ActionController::TestResponse.new + request = ActionController::TestRequest.new request.action = 'test' - assert_equal 'test: baz', Fun::PdfController.process(request, response).body + response = Rack::MockResponse.new(*Fun::PdfController.call(request.env)) + assert_equal 'test: baz', response.body end def test_all_helpers @@ -211,14 +211,16 @@ class IsolatedHelpersTest < Test::Unit::TestCase end def test_helper_in_a - assert_raise(ActionView::TemplateError) { A.process(@request, @response) } + assert_raise(ActionView::TemplateError) { A.call(@request.env) } end def test_helper_in_b - assert_equal 'B', B.process(@request, @response).body + response = Rack::MockResponse.new(*B.call(@request.env)) + assert_equal 'B', response.body end def test_helper_in_c - assert_equal 'C', C.process(@request, @response).body + response = Rack::MockResponse.new(*C.call(@request.env)) + assert_equal 'C', response.body end end |