Deprecation notice for TestResponse#redirected_to

This commit is contained in:
Joshua Peek 2010-01-30 12:26:26 -06:00
parent c164ca1efb
commit 1bd8a50a99
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,11 @@ module ActionDispatch
@template.layout
end
def redirected_to
::ActiveSupport::Deprecation.warn("response.redirected_to is deprecated. Use response.redirect_url instead", caller)
redirect_url
end
def redirect_url_match?(pattern)
::ActiveSupport::Deprecation.warn("response.redirect_url_match? is deprecated. Use assert_match(/foo/, response.redirect_url) instead", caller)
return false if redirect_url.nil?