Sha256: 52dcb33a3f2aae6836e0cc0fc7932d22dadf5e6fc7da03839124456283f06576

Contents?: true

Size: 1.14 KB

Versions: 93

Compression:

Stored size: 1.14 KB

Contents

require "spec_helper"

describe BasketsController do
  describe "routing" do

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

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

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

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

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

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

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

  end
end

Version data entries

93 entries across 91 versions & 3 rubygems

Version Path
enju_library-0.2.5 spec/routing/baskets_routing_spec.rb
enju_library-0.2.4 spec/routing/baskets_routing_spec.rb
enju_library-0.2.3 spec/routing/baskets_routing_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/spec/routing/baskets_routing_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/spec/routing/baskets_routing_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/spec/routing/baskets_routing_spec.rb
enju_library-0.2.2 spec/routing/baskets_routing_spec.rb
enju_library-0.2.1 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.10 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.9 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.8 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.7 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.6 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.5 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.4 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.3 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.2 spec/routing/baskets_routing_spec.rb
enju_library-0.2.0.beta.1 spec/routing/baskets_routing_spec.rb
enju_library-0.1.2 spec/routing/baskets_routing_spec.rb