public
Rubygem
Fork of thoughtbot/shoulda
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/technicalpickles/shoulda.git
doc patch for should_route
dancroak (author)
Mon Sep 29 22:51:33 -0700 2008
commit  3d6fc7d1ea321620b98e40b9a23d36f15ee5aafd
tree    c9be8d822dd095472e9dc6a445c59541024d3a39
parent  7b564422ea5774797e54d084230afde94c3a63be
...
280
281
282
283
284
285
286
287
288
 
 
 
 
 
 
 
 
 
289
290
291
...
280
281
282
 
 
 
 
 
 
283
284
285
286
287
288
289
290
291
292
293
294
0
@@ -280,12 +280,15 @@ module ThoughtBot # :nodoc:
0
         #
0
         # Examples:
0
         #
0
- # should_route :get, '/posts', :action => :index
0
- # should_route :post, '/posts', :controller => :posts, :action => :create
0
- # should_route :get, '/posts/1', :action => :show, :id => 1
0
- # should_route :put, '/posts/1', :action => :update, :id => "1"
0
- # should_route :delete, '/posts/1', :action => :destroy, :id => 1
0
- # should_route :get, '/posts/new', :action => :new
0
+ # should_route :get, "/posts", :controller => :posts, :action => :index
0
+ # should_route :get, "/posts/new", :action => :new
0
+ # should_route :post, "/posts", :action => :create
0
+ # should_route :get, "/posts/#{@post.id}", :action => :show, :id => @post.id
0
+ # should_route :edit, "/posts/#{@post.id}", :action => :show, :id => @post.id
0
+ # should_route :put, "/posts/#{@post.id}", :action => :update, :id => @post.id
0
+ # should_route :delete, "/posts/#{@post.id}", :action => :destroy, :id => @post.id
0
+ # should_route :get, "/users/#{@user.id}/posts/#{@post.id}",
0
+ # :action => :show, :id => @post.id, :user_id => @user.id
0
         #
0
         def should_route(method, path, options)
0
           unless options[:controller]

Comments

    No one has commented yet.