emberjs/ember.js — pull request #3704 by pangratz (2013-11-07 14:33:41+00:00)
Title: [BUGFIX beta] Fix import of Router module in ember-testing package

Since the router.js sync in cf0caa04f625067ec3b4629acdec12c8517df94e (which is already in beta branch), the Router is now stored in the "default" property.

Without this change the `instanceof` check in [ember-testing/lib/test.js#L493](https://github.com/pangratz/ember.js/blob/63376ed8b9e02181c4d0bba9303725b32fd0c13c/packages/ember-testing/lib/test.js#L493) fails - since `Router.TransitionAborted` is undefined - and an error is thrown:

``` javascript
function onerror(error) {
if (!(error instanceof Router.TransitionAborted)) {
Ember.Test.adapter.exception(error);
}
}
```

There is currently no spec for this, so no tests were failing. I thought about adding a regression test for this; while reading through the code, the check for for the error being `Router.TransitionAborted` was added by @teddyzeenny in [526bb0cd - Ember-testing should not cause a test failure when aborting transitions](https://github.com/emberjs/ember.js/blob/526bb0cddf9479085fa4b8d7bc9d924c20870426). The added test also succeeds when the function in [ember-testing/lib/test.js#L493](https://github.com/pangratz/ember.js/blob/8fa02a9/packages/ember-testing/lib/test.js#L493) is changed to

``` javascript
function onerror(error) {
Ember.Test.adapter.exception(error);
}
```

so the test is somewhat wrong, since with this change the test should fail. I don't have too much insight in the recent router.js / RSVP.js / ember-testing changes, but is it possible that the "ember-testing fails when a router transition is aborted" thing has been resolved?

//cc @machty @teddyzeenny