]> source.dussan.org Git - redmine.git/commitdiff
test: replace "should_route" of "activities" to "assert_routing" at integration/routi...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 14 Dec 2011 06:49:19 +0000 (06:49 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 14 Dec 2011 06:49:19 +0000 (06:49 +0000)
shoulda 2.11.3 does not support Rails2 legacy route on Rails 3.0.11.

<pre>
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
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8201 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/integration/routing_test.rb

index a6298703912773edb9c4251f3e65b30ced260636..a8fc2cdab03b3bc5d5b2741b831617c0f2dab5ad 100644 (file)
 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