Sha256: 07cc38f95a23054d077d01d279d9642eb49696ad917706e9c1acdcef87218394
Contents?: true
Size: 880 Bytes
Versions: 6
Compression:
Stored size: 880 Bytes
Contents
require 'spec_helper' <% module_namespacing do -%> describe <%= controller_class_name %>Controller do describe 'routing' do <% unless options[:singleton] -%> it { expect(get: '/<%= ns_table_name %>').to route_to('<%= ns_table_name %>#index') } <% end -%> it { expect(get: '/<%= ns_table_name %>/new').to route_to('<%= ns_table_name %>#new') } it { expect(get: '/<%= ns_table_name %>/1').to route_to('<%= ns_table_name %>#show', id: '1') } it { expect(get: '/<%= ns_table_name %>/1/edit').to route_to('<%= ns_table_name %>#edit', id: '1') } it { expect(post: '/<%= ns_table_name %>').to route_to('<%= ns_table_name %>#create') } it { expect(put: '/<%= ns_table_name %>/1').to route_to('<%= ns_table_name %>#update', id: '1') } it { expect(delete: '/<%= ns_table_name %>/1').to route_to('<%= ns_table_name %>#destroy', id: '1') } end end <% end -%>
Version data entries
6 entries across 6 versions & 2 rubygems