Froze rails gems
[depot.git] / vendor / rails / actionpack / test / controller / deprecation / deprecated_base_methods_test.rb
1 require 'abstract_unit'
2
3 class DeprecatedBaseMethodsTest < Test::Unit::TestCase
4 class Target < ActionController::Base
5 def home_url(greeting)
6 "http://example.com/#{greeting}"
7 end
8
9 def raises_name_error
10 this_method_doesnt_exist
11 end
12
13 def rescue_action(e) raise e end
14 end
15
16 def setup
17 @request = ActionController::TestRequest.new
18 @response = ActionController::TestResponse.new
19 @controller = Target.new
20 end
21
22 def test_log_error_silences_deprecation_warnings
23 get :raises_name_error
24 rescue => e
25 assert_not_deprecated { @controller.send :log_error, e }
26 end
27
28 def test_assertion_failed_error_silences_deprecation_warnings
29 get :raises_name_error
30 rescue => e
31 error = Test::Unit::Error.new('testing ur doodz', e)
32 assert_not_deprecated { error.message }
33 end
34 end