diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2010-09-05 22:59:41 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-06 13:41:12 +0200 |
commit | 9532d746a998f790a5c0c61caff17beeb43f39f0 (patch) | |
tree | a23cb91829a387d42a624d45961462c9deceb5ca /actionpack/test | |
parent | 11fccc5f06bc67353b895eeeb65cfab94cb4cd25 (diff) | |
download | rails-9532d746a998f790a5c0c61caff17beeb43f39f0.tar.gz rails-9532d746a998f790a5c0c61caff17beeb43f39f0.tar.bz2 rails-9532d746a998f790a5c0c61caff17beeb43f39f0.zip |
Cleanup deprecations in Action Dispatch
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 27 | ||||
-rw-r--r-- | actionpack/test/controller/test_test.rb | 7 |
2 files changed, 6 insertions, 28 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index c805742359..4f215c6df1 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -315,33 +315,22 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase # check the empty flashing def test_flash_me_naked process :flash_me_naked - assert_deprecated do - assert !@response.has_flash? - assert !@response.has_flash_with_contents? - end + assert flash.empty? end # check if we have flash objects def test_flash_haves process :flash_me - assert_deprecated do - assert @response.has_flash? - assert @response.has_flash_with_contents? - assert @response.has_flash_object?('hello') - end + assert flash.any? + assert_present flash['hello'] end # ensure we don't have flash objects def test_flash_have_nots process :nothing - assert_deprecated do - assert !@response.has_flash? - assert !@response.has_flash_with_contents? - assert_nil @response.flash['hello'] - end + assert flash.empty? end - # check if we were rendered by a file-based template? def test_rendered_action process :nothing @@ -393,12 +382,8 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase def test_redirect_url_match process :redirect_external assert @response.redirect? - assert_deprecated do - assert @response.redirect_url_match?("rubyonrails") - assert @response.redirect_url_match?(/rubyonrails/) - assert !@response.redirect_url_match?("phpoffrails") - assert !@response.redirect_url_match?(/perloffrails/) - end + assert_match /rubyonrails/, @response.redirect_url + assert !/perloffrails/.match(@response.redirect_url) end # check for a redirection diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index fc7d314e04..e90fc49542 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -674,13 +674,6 @@ XML assert_redirected_to 'created resource' end end - - def test_binary_content_works_with_send_file - get :test_send_file - assert_deprecated do - assert_nothing_raised(NoMethodError) { @response.binary_content } - end - end end class InferringClassNameTest < ActionController::TestCase |