提交 5fcf885d 编写于 作者: W Wojciech Wnętrzak

Updated with_routing example to 3.x syntax [ci skip]

上级 acec6d3b
......@@ -127,16 +127,13 @@ def assert_routing(path, options, defaults={}, extras={}, message=nil)
# with a new RouteSet instance.
#
# The new instance is yielded to the passed block. Typically the block
# will create some routes using <tt>map.draw { map.connect ... }</tt>:
# will create some routes using <tt>set.draw { match ... }</tt>:
#
# with_routing do |set|
# set.draw do |map|
# map.connect ':controller/:action/:id'
# assert_equal(
# ['/content/10/show', {}],
# map.generate(:controller => 'content', :id => 10, :action => 'show')
# end
# set.draw do
# resources :users
# end
# assert_equal "/users", users_path
# end
#
def with_routing
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册