Sha256: 21708314f661afc057aee7a3aee9ce8e6331749784c6163c86cd91f75e3fdf09

Contents?: true

Size: 778 Bytes

Versions: 5

Compression:

Stored size: 778 Bytes

Contents

require "spec_helper"

describe PostsController do
  describe "routing" do

    it "routes to #index" do
      get("/posts").should route_to("posts#index")
    end

    it "routes to #new" do
      get("/posts/new").should route_to("posts#new")
    end

    it "routes to #show" do
      get("/posts/1").should route_to("posts#show", :id => "1")
    end

    it "routes to #edit" do
      get("/posts/1/edit").should route_to("posts#edit", :id => "1")
    end

    it "routes to #create" do
      post("/posts").should route_to("posts#create")
    end

    it "routes to #update" do
      put("/posts/1").should route_to("posts#update", :id => "1")
    end

    it "routes to #destroy" do
      delete("/posts/1").should route_to("posts#destroy", :id => "1")
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rrjj-0.0.1 spec/routing/posts_routing_spec.rb
ampere-1.2.3 example/spec/routing/posts_routing_spec.rb
ampere-1.2.2 example/spec/routing/posts_routing_spec.rb
ampere-1.2.1 example/spec/routing/posts_routing_spec.rb
ampere-1.2.0 example/spec/routing/posts_routing_spec.rb