dannyvankooten/AltoRouter — pull request #22 by koenpunt (2013-07-14 21:37:14+00:00)
Title: Added tests

Added test and fixed an issue with optional url parts not being correctly stripped:

```
# Before without the type param
/bar/[:controller]/[:action].[:type]? => /bar/test/action.

# Now without the type param
/bar/[:controller]/[:action].[:type]? => /bar/test/action
```

Although there is still one issue left:

```
# URL With route
/bar/test/do.json => /bar/[:controller]/[:action].[:type]?

# Results in
array('controller' => 'test', 'action' => 'do.json');

# Should result in
array('controller' => 'test', 'action' => 'do', 'type' => 'json');
```