From 8c4b599b7c62b85069fa04533e8f06e5476f927a Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 13 Aug 2006 18:31:58 +0000 Subject: Fix assert_redirected_to issue with named routes for module controllers. [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/assertions.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb index e81ebfb893..443449345b 100644 --- a/actionpack/lib/action_controller/assertions.rb +++ b/actionpack/lib/action_controller/assertions.rb @@ -108,13 +108,14 @@ module Test #:nodoc: end if value.respond_to?(:[]) && value['controller'] - if key == :actual && value['controller'].first != '/' + if key == :actual && value['controller'].first != '/' && !value['controller'].include?('/') value['controller'] = ActionController::Routing.controller_relative_to(value['controller'], @controller.class.controller_path) end value['controller'] = value['controller'][1..-1] if value['controller'].first == '/' # strip leading hash end url[key] = value end + @response_diff = url[:expected].diff(url[:actual]) if url[:actual] msg = build_message(message, "response is not a redirection to all of the options supplied (redirection is ), difference: ", -- cgit v1.2.3