11af089cee
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
27 lines
593 B
Ruby
27 lines
593 B
Ruby
require 'abstract_unit'
|
|
|
|
class DeprecatedBaseMethodsTest < ActionController::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
|
|
|
|
tests Target
|
|
|
|
if defined? Test::Unit::Error
|
|
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
|
|
end
|