aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/routing.textile
diff options
context:
space:
mode:
Diffstat (limited to 'railties/guides/source/routing.textile')
-rw-r--r--railties/guides/source/routing.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile
index 79cd39d066..24f0578545 100644
--- a/railties/guides/source/routing.textile
+++ b/railties/guides/source/routing.textile
@@ -871,13 +871,13 @@ h5. The +assert_recognizes+ Assertion
The +assert_recognizes+ assertion is the inverse of +assert_generates+. It asserts that Rails recognizes the given path and routes it to a particular spot in your application.
<ruby>
-assert_recognizes { :controller => "photos", :action => "show", :id => "1" }, "/photos/1"
+assert_recognizes({ :controller => "photos", :action => "show", :id => "1" }, "/photos/1")
</ruby>
You can supply a +:method+ argument to specify the HTTP verb:
<ruby>
-assert_recognizes { :controller => "photos", :action => "create" }, { :path => "photos", :method => :post }
+assert_recognizes({ :controller => "photos", :action => "create" }, { :path => "photos", :method => :post })
</ruby>
You can also use the RESTful helpers to test recognition of a RESTful route: