spec/innate/route.rb in manveru-innate-2009.02.06 vs spec/innate/route.rb in manveru-innate-2009.02.21

- old
+ new

@@ -124,6 +124,14 @@ it 'should exclude existing actions' do got = Innate::Mock.get('/bar') got.status.should == 200 got.body.should == 'this is bar' end + + it 'should rewite with (key, val)' do + Innate::Rewrite[ %r!^/(.+)$! ] = nil + Innate::Rewrite(%r!^/(.+)$!, "/string/%s") + got = Innate::Mock.get('/hello') + got.status.should == 200 + got.body.should == 'String: hello' + end end