Skip to content

Commit 399a740

Browse files
authored
Merge pull request #1929 from nikolalsvk/patch-1
Fix routing spec scaffold format
2 parents f150bf7 + e4a20bf commit 399a740

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/generators/rspec/scaffold/templates/routing_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<% module_namespacing do -%>
44
RSpec.describe <%= controller_class_name %>Controller, <%= type_metatag(:routing) %> do
55
describe "routing" do
6-
76
<% unless options[:singleton] -%>
87
it "routes to #index" do
98
expect(:get => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#index")
@@ -14,8 +13,8 @@
1413
it "routes to #new" do
1514
expect(:get => "/<%= ns_table_name %>/new").to route_to("<%= ns_table_name %>#new")
1615
end
17-
<% end -%>
1816
17+
<% end -%>
1918
it "routes to #show" do
2019
expect(:get => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#show", :id => "1")
2120
end
@@ -24,6 +23,7 @@
2423
it "routes to #edit" do
2524
expect(:get => "/<%= ns_table_name %>/1/edit").to route_to("<%= ns_table_name %>#edit", :id => "1")
2625
end
26+
2727
<% end -%>
2828
2929
it "routes to #create" do
@@ -43,7 +43,6 @@
4343
it "routes to #destroy" do
4444
expect(:delete => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#destroy", :id => "1")
4545
end
46-
4746
end
4847
end
4948
<% end -%>

0 commit comments

Comments
 (0)