diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-03 22:35:31 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-03 22:35:31 +0000 |
commit | 4bd444c1fe960e757819fb67dada0a5a0bf344e4 (patch) | |
tree | 06ca057f21afb01c7d7eae1d95f7f92433a252cc /actionpack/test | |
parent | eb90b94afdc4358793647b08d28e29af34d45ff8 (diff) | |
download | rails-4bd444c1fe960e757819fb67dada0a5a0bf344e4.tar.gz rails-4bd444c1fe960e757819fb67dada0a5a0bf344e4.tar.bz2 rails-4bd444c1fe960e757819fb67dada0a5a0bf344e4.zip |
More deprecation fun
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4943 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/deprecation/deprecated_base_methods_test.rb | 32 | ||||
-rw-r--r-- | actionpack/test/controller/url_rewriter_test.rb | 1 |
2 files changed, 32 insertions, 1 deletions
diff --git a/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb b/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb new file mode 100644 index 0000000000..24b4a5d9f5 --- /dev/null +++ b/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb @@ -0,0 +1,32 @@ +require File.dirname(__FILE__) + '/../../abstract_unit' + +class DeprecatedBaseMethodsTest < Test::Unit::TestCase + class Target < ActionController::Base + def deprecated_symbol_parameter_to_url_for + redirect_to(url_for(:home_url, "superstars")) + end + + def deprecated_render_parameters + # render "" + end + + def home_url(greeting) + "http://example.com/#{greeting}" + end + + def rescue_action(e) raise e end + end + + def setup + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + @controller = Target.new + end + + def test_deprecated_symbol_parameter_to_url_for + assert_deprecated("url_for(:home_url)") do + get :deprecated_symbol_parameter_to_url_for + end + assert_redirected_to "http://example.com/superstars" + end +end diff --git a/actionpack/test/controller/url_rewriter_test.rb b/actionpack/test/controller/url_rewriter_test.rb index 114b0d238f..f71f79db47 100644 --- a/actionpack/test/controller/url_rewriter_test.rb +++ b/actionpack/test/controller/url_rewriter_test.rb @@ -90,5 +90,4 @@ class UrlWriterTests < Test::Unit::TestCase ensure ActionController::Routing::Routes.load! end - end |