Merge pull request #47200 from skipkayhil/use-ad-deprecator-illegal-state
Use AD.deprecator for IllegalStateError
This commit is contained in:
commit
3cca0d5205
@ -36,11 +36,14 @@ module Rack
|
||||
end
|
||||
|
||||
module ActionDispatch
|
||||
include ActiveSupport::Deprecation::DeprecatedConstantAccessor
|
||||
extend ActiveSupport::Autoload
|
||||
|
||||
class IllegalStateError < StandardError
|
||||
class DeprecatedIllegalStateError < StandardError
|
||||
end
|
||||
deprecate_constant :IllegalStateError
|
||||
deprecate_constant "IllegalStateError", "ActionDispatch::DeprecatedIllegalStateError",
|
||||
message: "ActionDispatch::IllegalStateError is deprecated without replacement.",
|
||||
deprecator: ActionDispatch.deprecator
|
||||
|
||||
class MissingController < NameError
|
||||
end
|
||||
|
@ -10,6 +10,12 @@ def setup
|
||||
@response.request = ActionDispatch::Request.empty
|
||||
end
|
||||
|
||||
def test_illegal_state_error_is_deprecated
|
||||
assert_deprecated(ActionDispatch.deprecator) do
|
||||
ActionDispatch::IllegalStateError
|
||||
end
|
||||
end
|
||||
|
||||
def test_can_wait_until_commit
|
||||
t = Thread.new {
|
||||
@response.await_commit
|
||||
|
Loading…
Reference in New Issue
Block a user