Sha256: 31a7e14eb08847742f8a41d2503f9898ac5a19f5f875b1437bc89d61a77d4cab

Contents?: true

Size: 1.1 KB

Versions: 15

Compression:

Stored size: 1.1 KB

Contents

# -*- encoding : utf-8 -*-
require "spec_helper"

describe <%= @model.controller_name %>Controller do
  describe "routing" do

    it "routes to #index" do
      get("/<%= @model.to_route_url %>").should route_to("<%= @model.to_route_url %>#index")
    end

    it "routes to #new" do
      get("/<%= @model.to_route_url %>/new").should route_to("<%= @model.to_route_url %>#new")
    end

    it "routes to #show" do
      get("/<%= @model.to_route_url %>/1").should route_to("<%= @model.to_route_url %>#show", :id => "1")
    end

    it "routes to #edit" do
      get("/<%= @model.to_route_url %>/1/edit").should route_to("<%= @model.to_route_url %>#edit", :id => "1")
    end

    it "routes to #create" do
      post("/<%= @model.to_route_url %>").should route_to("<%= @model.to_route_url %>#create")
    end

    it "routes to #update" do
      put("/<%= @model.to_route_url %>/1").should route_to("<%= @model.to_route_url %>#update", :id => "1")
    end

    it "routes to #destroy" do
      delete("/<%= @model.to_route_url %>/1").should route_to("<%= @model.to_route_url %>#destroy", :id => "1")
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mdd-3.1.0 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.20 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.19 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.18 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.17 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.16 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.15 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.14 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.13 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.10 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.9 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.8 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.7 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.6 lib/generators/mdwa/scaffold/templates/specs/routing.rb
mdd-3.0.4 lib/generators/mdwa/scaffold/templates/specs/routing.rb