From 0b4aed008c9650e5f4d7290fe6a243b4f3b1eb1d 2011-12-14 06:49:19 From: Toshi MARUYAMA Date: 2011-12-14 06:49:19 Subject: [PATCH] test: replace "should_route" of "activities" to "assert_routing" at integration/routing_test.rb shoulda 2.11.3 does not support Rails2 legacy route on Rails 3.0.11.
Error:
test: wikis (plural, admin setup) should route POST /projects/ladida/wiki/destroy
to/from {:action=>"destroy", :id=>"ladida", :controller=>"wikis"}. (RoutingTest):
NameError: uninitialized constant Routing
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8201 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index a629870..a8fc2cd 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -18,9 +18,15 @@ require File.expand_path('../../test_helper', __FILE__) class RoutingTest < ActionController::IntegrationTest - context "activities" do - should_route :get, "/activity", :controller => 'activities', :action => 'index', :id => nil - should_route :get, "/activity.atom", :controller => 'activities', :action => 'index', :id => nil, :format => 'atom' + def test_activities + assert_routing( + { :method => 'get', :path => "/activity" }, + { :controller => 'activities', :action => 'index', :id => nil } + ) + assert_routing( + { :method => 'get', :path => "/activity.atom" }, + { :controller => 'activities', :action => 'index', :id => nil, :format => 'atom' } + ) end context "attachments" do