提交 4097ff5c 编写于 作者: A Aaron Patterson

use the factory method to construct the mapping

上级 e3df1dd0
......@@ -38,7 +38,7 @@ def test_initialize
def test_mapping_requirements
options = { :controller => 'foo', :action => 'bar', :via => :get }
m = Mapper::Mapping.new({}, '/store/:name(*rest)', options)
m = Mapper::Mapping.build({}, '/store/:name(*rest)', options)
_, _, requirements, _ = m.to_route
assert_equal(/.+?/, requirements[:rest])
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册