Sha256: 0e37c6cb59be9f3f9bffcb709b3ae2d9a69e475f6a03c405ec73c16e33fc56a1
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
require "spec_helper" describe PostsController do describe "routing" do it "recognizes and generates #index" do { :get => "/posts" }.should route_to(:controller => "posts", :action => "index") end it "recognizes and generates #new" do { :get => "/posts/new" }.should route_to(:controller => "posts", :action => "new") end it "recognizes and generates #show" do { :get => "/posts/1" }.should route_to(:controller => "posts", :action => "show", :id => "1") end it "recognizes and generates #edit" do { :get => "/posts/1/edit" }.should route_to(:controller => "posts", :action => "edit", :id => "1") end it "recognizes and generates #create" do { :post => "/posts" }.should route_to(:controller => "posts", :action => "create") end it "recognizes and generates #update" do { :put => "/posts/1" }.should route_to(:controller => "posts", :action => "update", :id => "1") end it "recognizes and generates #destroy" do { :delete => "/posts/1" }.should route_to(:controller => "posts", :action => "destroy", :id => "1") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bobby-0.0.4 | spec/routing/posts_routing_spec.rb |
bobby-0.0.3 | spec/routing/posts_routing_spec.rb |