Updated tests
[sinatra.git] / test / sinatra / url_test.rb
blobf340cdb738a5dbf6f8fc66d1415f88645346386a
1 require File.dirname(__FILE__) + '/../helper'
3 describe "Route" do
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'
13   end
15 end