Sha256: 176f58d4987564391097a9f9a204755e0f5e57d594c3bbfce3bf3d60befb6ee2

Contents?: true

Size: 1.14 KB

Versions: 51

Compression:

Stored size: 1.14 KB

Contents

require "spec_helper"

describe PatronsController do
  describe "routing" do

    it "recognizes and generates #index" do
      { :get => "/patrons" }.should route_to(:controller => "patrons", :action => "index")
    end

    it "recognizes and generates #new" do
      { :get => "/patrons/new" }.should route_to(:controller => "patrons", :action => "new")
    end

    it "recognizes and generates #show" do
      { :get => "/patrons/1" }.should route_to(:controller => "patrons", :action => "show", :id => "1")
    end

    it "recognizes and generates #edit" do
      { :get => "/patrons/1/edit" }.should route_to(:controller => "patrons", :action => "edit", :id => "1")
    end

    it "recognizes and generates #create" do
      { :post => "/patrons" }.should route_to(:controller => "patrons", :action => "create")
    end

    it "recognizes and generates #update" do
      { :put => "/patrons/1" }.should route_to(:controller => "patrons", :action => "update", :id => "1")
    end

    it "recognizes and generates #destroy" do
      { :delete => "/patrons/1" }.should route_to(:controller => "patrons", :action => "destroy", :id => "1")
    end

  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
enju_biblio-0.1.0.pre2 spec/routing/patrons_routing_spec.rb
enju_biblio-0.1.0.pre spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.9 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.8 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.7 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.6 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.5 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.4 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.3 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.2 spec/routing/patrons_routing_spec.rb
enju_biblio-0.0.1 spec/routing/patrons_routing_spec.rb