Changeset 7838
- Timestamp:
- 10/11/07 21:56:19 (1 year ago)
- Files:
-
- branches/1-2-stable/actionpack/lib/action_controller/assertions/response_assertions.rb (modified) (1 diff)
- branches/1-2-stable/actionpack/lib/action_controller/routing.rb (modified) (1 diff)
- branches/1-2-stable/actionpack/test/controller/action_pack_assertions_test.rb (modified) (2 diffs)
- branches/1-2-stable/actionpack/test/controller/url_rewriter_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1-2-stable/actionpack/lib/action_controller/assertions/response_assertions.rb
r6471 r7838 70 70 71 71 if value.respond_to?(:[]) && value['controller'] 72 value['controller'] = value['controller'].to_s 72 73 if key == :actual && value['controller'].first != '/' && !value['controller'].include?('/') 73 74 new_controller_path = ActionController::Routing.controller_relative_to(value['controller'], @controller.class.controller_path) branches/1-2-stable/actionpack/lib/action_controller/routing.rb
r7834 r7838 1255 1255 expire_on = build_expiry(options, recall) 1256 1256 1257 if options[:controller] 1258 options[:controller] = options[:controller].to_s 1259 end 1257 1260 # if the controller has changed, make sure it changes relative to the 1258 1261 # current controller module, if any. In other words, if we're currently branches/1-2-stable/actionpack/test/controller/action_pack_assertions_test.rb
r5788 r7838 19 19 20 20 def redirect_to_controller() redirect_to :controller => "elsewhere", :action => "flash_me"; end 21 22 def redirect_to_controller_with_symbol() redirect_to :controller => :elsewhere, :action => :flash_me; end 21 23 22 24 def redirect_to_path() redirect_to '/some/path' end … … 556 558 end 557 559 560 def test_assert_redirection_with_symbol 561 process :redirect_to_controller_with_symbol 562 assert_nothing_raised { 563 assert_redirected_to :controller => "elsewhere", :action => "flash_me" 564 } 565 process :redirect_to_controller_with_symbol 566 assert_nothing_raised { 567 assert_redirected_to :controller => :elsewhere, :action => :flash_me 568 } 569 end 570 558 571 def test_redirected_to_with_nested_controller 559 572 @controller = Admin::InnerModuleController.new branches/1-2-stable/actionpack/test/controller/url_rewriter_test.rb
r7834 r7838 161 161 end 162 162 163 def test_path_generation_for_symbol_parameter_keys 164 assert_generates("/image", :controller=> :image) 165 end 166 163 167 private 164 168 def extract_params(url)