ff0000/rosy — pull request #79 by potench (2013-01-18 06:35:43+00:00)
Title: Feature/refresh 

## Updates:

* You can add `forceRefresh:true` to the `config` object in your route to skip the `update()` method and transition normaly between URLS that match a single route configuration.
* Added tests to ensure same `View` prototype but a different `new View()` instance is created
* Added tests to ensure transitions between the `View` instances still works correctly on refresh.

```javascript
// routes.js
// example 1: configure a route to instantiate, transition, and cleanup across multiple matched URLS (default behavior for unmatched routes)
{
"viewClass" : prefix + "views/SomeView",
"route" : "/refresh/:section?",
"config" : {
"forceRefresh" : true
}
}
// expected result:
// start: `/refresh/a` - SomeView is instantiated as the current-view
// changeRoute: `/refresh/b` - instantiaties a new SomeView and transitions between current SomeView and new SomeView skipping the update() function which previously triggered requiring manual implementation of View transition (or whatever)
```

```javascript
// routes.js
// example 2: same thing but using "routes" array.
{
"viewClass" : prefix + "views/SomeView",
"routes" : [
"/refresh-2",
"/refresh-3"
],
"config" : {
"forceRefresh" : true
}
}
// expected result:
// start: /refresh-2 - instantiates SomeView
// changeRoute: /refresh-3 : instantiates new SomeView and transitions between old SomeView and new SomeView
```

Not sure if there's a prefered way to handle the above case, but I found it easier to hook back in to the default behaviour of route management rather than implementing something new in `update()` everytime multiple URLS match a single route.