    # File lib/action_controller/assertions.rb, line 73
          def assert_redirected_to(options = {}, message=nil)
            clean_backtrace do
              assert_response(:redirect, message)

              if options.is_a?(String)
                msg = build_message(message, "expected a redirect to <?>, found one to <?>", options, @response.redirect_url)
                url_regexp = %r{^(\w+://.*?(/|$|\?))(.*)$}
                eurl, epath, url, path = [options, @response.redirect_url].collect do |url|
                  u, p = (url_regexp =~ url) ? [$1, $3] : [nil, url]
                  [u, (p[0..0] == '/') ? p : '/' + p]
                end.flatten

                assert_equal(eurl, url, msg) if eurl && url
                assert_equal(epath, path, msg) if epath && path
              else
                @response_diff = options.diff(@response.redirected_to) if options.is_a?(Hash) && @response.redirected_to.is_a?(Hash)
                msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is <?>)#{', difference: <?>' if @response_diff}",
                                    @response.redirected_to || @response.redirect_url, @response_diff)

                assert_block(msg) do
                  if options.is_a?(Symbol)
                    @response.redirected_to == options
                  else
                    options.keys.all? do |k|
                      if k == :controller then options[k] == ActionController::Routing.controller_relative_to(@response.redirected_to[k], @controller.class.controller_path)
                      else options[k] == (@response.redirected_to[k].respond_to?(:to_param) ? @response.redirected_to[k].to_param : @response.redirected_to[k] unless @response.redirected_to[k].nil?)
                      end
                    end
                  end
                end
              end
            end
          end