From 1bd8a50a995a047c8546e8901582b9d1e16af2df Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 30 Jan 2010 12:26:26 -0600 Subject: Deprecation notice for TestResponse#redirected_to --- actionpack/lib/action_dispatch/testing/test_response.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 6d019023ce..9a51a32899 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -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? -- cgit v1.2.3