diff options
author | francis <francis> | 2008-01-23 01:48:14 +0000 |
---|---|---|
committer | francis <francis> | 2008-01-23 01:48:14 +0000 |
commit | 60eaae4f7df1f1dae91defb87d3707451c359cf4 (patch) | |
tree | e74835c37779a2f094e810960cda07b99a75330e /vendor/rails-2.0.2/actionpack/test/controller/deprecation | |
parent | 71d22c740302e1f83bbbd89b229734ea9c67493c (diff) |
Freeze in rails 2.0.2 (Am I going to regret having this beast in CVS?)
Diffstat (limited to 'vendor/rails-2.0.2/actionpack/test/controller/deprecation')
-rw-r--r-- | vendor/rails-2.0.2/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/rails-2.0.2/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb b/vendor/rails-2.0.2/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb new file mode 100644 index 000000000..6d7157e1a --- /dev/null +++ b/vendor/rails-2.0.2/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb @@ -0,0 +1,37 @@ +require File.dirname(__FILE__) + '/../../abstract_unit' + +class DeprecatedBaseMethodsTest < Test::Unit::TestCase + class Target < ActionController::Base + + def home_url(greeting) + "http://example.com/#{greeting}" + end + + def raises_name_error + this_method_doesnt_exist + end + + def rescue_action(e) raise e end + end + + Target.view_paths = [ File.dirname(__FILE__) + "/../../fixtures" ] + + def setup + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + @controller = Target.new + end + + def test_log_error_silences_deprecation_warnings + get :raises_name_error + rescue => e + assert_not_deprecated { @controller.send :log_error, e } + end + + def test_assertion_failed_error_silences_deprecation_warnings + get :raises_name_error + rescue => e + error = Test::Unit::Error.new('testing ur doodz', e) + assert_not_deprecated { error.message } + end +end |