Skip to content

Commit c1814bb

Browse files
committed
Update routing spec generator to use 'expect' syntax
1 parent 7a7bb1a commit c1814bb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,32 @@
66
77
<% unless options[:singleton] -%>
88
it "routes to #index" do
9-
get("/<%= ns_table_name %>").should route_to("<%= ns_table_name %>#index")
9+
expect(:get => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#index")
1010
end
1111
1212
<% end -%>
1313
it "routes to #new" do
14-
get("/<%= ns_table_name %>/new").should route_to("<%= ns_table_name %>#new")
14+
expect(:get => "/<%= ns_table_name %>/new").to route_to("<%= ns_table_name %>#new")
1515
end
1616
1717
it "routes to #show" do
18-
get("/<%= ns_table_name %>/1").should route_to("<%= ns_table_name %>#show", :id => "1")
18+
expect(:get => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#show", :id => "1")
1919
end
2020
2121
it "routes to #edit" do
22-
get("/<%= ns_table_name %>/1/edit").should route_to("<%= ns_table_name %>#edit", :id => "1")
22+
expect(:get => "/<%= ns_table_name %>/1/edit").to route_to("<%= ns_table_name %>#edit", :id => "1")
2323
end
2424
2525
it "routes to #create" do
26-
post("/<%= ns_table_name %>").should route_to("<%= ns_table_name %>#create")
26+
expect(:post => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#create")
2727
end
2828
2929
it "routes to #update" do
30-
put("/<%= ns_table_name %>/1").should route_to("<%= ns_table_name %>#update", :id => "1")
30+
expect(:put => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#update", :id => "1")
3131
end
3232
3333
it "routes to #destroy" do
34-
delete("/<%= ns_table_name %>/1").should route_to("<%= ns_table_name %>#destroy", :id => "1")
34+
expect(:delete => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#destroy", :id => "1")
3535
end
3636
3737
end

0 commit comments

Comments
 (0)