use the factory method to construct the mapping
This commit is contained in:
parent
e3df1dd047
commit
4097ff5c5f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user