Sha256: 802b61496dda87aedf2afda6c417357f0e23d44d34b1415a4d9ff6b6d6debf73

Contents?: true

Size: 1.47 KB

Versions: 19

Compression:

Stored size: 1.47 KB

Contents

require "spec_helper"

<% module_namespacing do -%>
describe <%= controller_class_name %>Controller do
  describe "routing" do

<% unless options[:singleton] -%>
    it "routes to #index" do
      get("/<%= options[:activespace] %>/<%= ns_table_name %>").should route_to("<%= options[:activespace] %>/<%= ns_table_name %>#index")
    end

<% end -%>
    it "routes to #new" do
      get("/<%= options[:activespace] %>/<%= ns_table_name %>/new").should route_to("<%= options[:activespace] %>/<%= ns_table_name %>#new")
    end

    it "routes to #show" do
      get("/<%= options[:activespace] %>/<%= ns_table_name %>/1").should route_to("<%= options[:activespace] %>/<%= ns_table_name %>#show", :id => "1")
    end

    it "routes to #edit" do
      get("/<%= options[:activespace] %>/<%= ns_table_name %>/1/edit").should route_to("<%= options[:activespace] %>/<%= ns_table_name %>#edit", :id => "1")
    end

    it "routes to #create" do
      post("/<%= options[:activespace] %>/<%= ns_table_name %>").should route_to("<%= options[:activespace] %>/<%= ns_table_name %>#create")
    end

    it "routes to #update" do
      put("/<%= options[:activespace] %>/<%= ns_table_name %>/1").should route_to("<%= options[:activespace] %>/<%= ns_table_name %>#update", :id => "1")
    end

    it "routes to #destroy" do
      delete("/<%= options[:activespace] %>/<%= ns_table_name %>/1").should route_to("<%= options[:activespace] %>/<%= ns_table_name %>#destroy", :id => "1")
    end

  end
end
<% end -%>

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
active_leonardo-0.9.0 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.8.1 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.8.0 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.7.0 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.6.1 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.6.0 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.5.3 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.5.2 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.5.1 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.5.0 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.4.1 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.2.3 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.2.2 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.2.1 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.1.0 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.0.7 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.0.6 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.0.6.beta2 lib/generators/rspec/leosca/templates/admin/routing_spec.rb
active_leonardo-0.0.6.beta1 lib/generators/rspec/leosca/templates/routing_spec.rb