box-o-sand/rails/map-mash/spec/routing/mashes_routing_spec.rb
2012-03-04 11:51:35 -05:00

34 lines
1.1 KiB
Ruby

require 'spec_helper'
describe MashesController do
describe "routing" do
it "recognizes and generates #index" do
{ :get => "/mashes" }.should route_to(:controller => "mashes", :action => "index")
end
it "recognizes and generates #new" do
{ :get => "/mashes/new" }.should route_to(:controller => "mashes", :action => "new")
end
it "recognizes and generates #show" do
{ :get => "/mashes/1" }.should route_to(:controller => "mashes", :action => "show", :id => "1")
end
it "recognizes and generates #edit" do
{ :get => "/mashes/1/edit" }.should route_to(:controller => "mashes", :action => "edit", :id => "1")
end
it "recognizes and generates #create" do
{ :post => "/mashes" }.should route_to(:controller => "mashes", :action => "create")
end
it "recognizes and generates #update" do
{ :put => "/mashes/1" }.should route_to(:controller => "mashes", :action => "update", :id => "1")
end
it "recognizes and generates #destroy" do
{ :delete => "/mashes/1" }.should route_to(:controller => "mashes", :action => "destroy", :id => "1")
end
end
end