Skip to content
Browse files

Update routing spec generator to use 'expect' syntax

  • Loading branch information...
1 parent 7a7bb1a commit c1814bbedc61c7ad9d41953446cfde203ff70178 @paav-o paav-o committed Jul 19, 2013
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/generators/rspec/scaffold/templates/routing_spec.rb
View
14 lib/generators/rspec/scaffold/templates/routing_spec.rb
@@ -6,32 +6,32 @@
<% unless options[:singleton] -%>
it "routes to #index" do
- get("/<%= ns_table_name %>").should route_to("<%= ns_table_name %>#index")
+ expect(:get => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#index")
end
<% end -%>
it "routes to #new" do
- get("/<%= ns_table_name %>/new").should route_to("<%= ns_table_name %>#new")
+ expect(:get => "/<%= ns_table_name %>/new").to route_to("<%= ns_table_name %>#new")
end
it "routes to #show" do
- get("/<%= ns_table_name %>/1").should route_to("<%= ns_table_name %>#show", :id => "1")
+ expect(:get => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#show", :id => "1")
end
it "routes to #edit" do
- get("/<%= ns_table_name %>/1/edit").should route_to("<%= ns_table_name %>#edit", :id => "1")
+ expect(:get => "/<%= ns_table_name %>/1/edit").to route_to("<%= ns_table_name %>#edit", :id => "1")
end
it "routes to #create" do
- post("/<%= ns_table_name %>").should route_to("<%= ns_table_name %>#create")
+ expect(:post => "/<%= ns_table_name %>").to route_to("<%= ns_table_name %>#create")
end
it "routes to #update" do
- put("/<%= ns_table_name %>/1").should route_to("<%= ns_table_name %>#update", :id => "1")
+ expect(:put => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#update", :id => "1")
end
it "routes to #destroy" do
- delete("/<%= ns_table_name %>/1").should route_to("<%= ns_table_name %>#destroy", :id => "1")
+ expect(:delete => "/<%= ns_table_name %>/1").to route_to("<%= ns_table_name %>#destroy", :id => "1")
end
end

0 comments on commit c1814bb

Please sign in to comment.
Something went wrong with that request. Please try again.