use the factory method to construct the mapping

This commit is contained in:
Aaron Patterson 2014-06-03 11:42:45 -07:00
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