diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-09-10 19:32:41 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-09-10 19:32:53 +0100 |
commit | faee12d5af7182e8aca0e44faee149d289a6dfa0 (patch) | |
tree | 8e09fdec1e0482485686e4556e7abb7975ef88f4 /railties/doc/guides | |
parent | 383467fb5da3d0d17bb3e41b6b4c0ab69b2ef082 (diff) | |
download | rails-faee12d5af7182e8aca0e44faee149d289a6dfa0.tar.gz rails-faee12d5af7182e8aca0e44faee149d289a6dfa0.tar.bz2 rails-faee12d5af7182e8aca0e44faee149d289a6dfa0.zip |
Fix a typo in guide and change assertion style in examples
Diffstat (limited to 'railties/doc/guides')
-rw-r--r-- | railties/doc/guides/routing/routing_outside_in.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/doc/guides/routing/routing_outside_in.txt b/railties/doc/guides/routing/routing_outside_in.txt index 8bad4e0673..1a4b1a9530 100644 --- a/railties/doc/guides/routing/routing_outside_in.txt +++ b/railties/doc/guides/routing/routing_outside_in.txt @@ -801,8 +801,8 @@ Use +assert_generates+ to assert that a particular set of options generate a par [source, ruby] ------------------------------------------------------- -assert_generates("/photos/1", { :controller => "photos", :action => "show", :id => "1" }) -assert_generates("/about", :controller => "pages", :action => "about") +assert_generates "/photos/1", { :controller => "photos", :action => "show", :id => "1" } +assert_generates "/about", :controller => "pages", :action => "about" ------------------------------------------------------- ==== The +assert_recognizes+ Assertion @@ -811,21 +811,21 @@ The +assert_recognizes+ assertion is the inverse of +assert_generates+. It asser [source, ruby] ------------------------------------------------------- -assert_recognizes({ :controller => "photos", :action => "show", :id => "1" }, "/photos/1") +assert_recognizes { :controller => "photos", :action => "show", :id => "1" }, "/photos/1" ------------------------------------------------------- You can supply a +:method+ argument to specify the HTTP verb: [source, ruby] ------------------------------------------------------- -assert_recognizes({ :controller => "photos", :action => "create" }, { :path => "photos", :method => :post }) +assert_recognizes { :controller => "photos", :action => "create" }, { :path => "photos", :method => :post } ------------------------------------------------------- You can also use the RESTful helpers to test recognition of a RESTful route: [source, ruby] ------------------------------------------------------- -assert_recognizes(new_photo_url, { :path => "photos", :method => :post }) +assert_recognizes new_photo_url, { :path => "photos", :method => :post } ------------------------------------------------------- ==== The +assert_routing+ Assertion @@ -834,5 +834,5 @@ The +assert_routing+ assertion checks the route both ways: it tests that the pat [source, ruby] ------------------------------------------------------- -assert_recognizes({ :path => "photos", :method => :post }, { :controller => "photos", :action => "create" }) +assert_routing { :path => "photos", :method => :post }, { :controller => "photos", :action => "create" } -------------------------------------------------------
\ No newline at end of file |