1 require File.dirname(__FILE__) + '/../helper'
5 it "should recognize params in urls" do
6 route = Sinatra::Route.new('/foo/:test/:blake')
8 route.recognize('/foo/bar/baz').should.equal true
9 route.params.should.equal :test => 'bar', :blake => 'baz', :format => 'html'
11 route.recognize('/foo/bar/baz.xml').should.equal true
12 route.params.should.equal :test => 'bar', :blake => 'baz', :format => 'xml'