emberjs/ember.js — pull request #2606 by teddyzeenny (2013-05-01 13:23:03+00:00)
Title: Create Ember.Test with registerHelper method

This will expose an `Ember.Test` that will allow us to expose methods for users to customize their testing environment.

The first thing I added was `Ember.Test.registerHelper` method, which allows us to create our own custom helpers.

The helper will always get passed the current application as a first argument:

```javascript
Em.Test.registerHelper('boot', function(app) {
Em.run(app, app.advanceReadiness);
return wait();
});

App = Em.Application.create();
App.setupForTesting();
App.injectTestHelpers();

boot().then(function() {
return visit('/posts');
}).then(function() {
// assertion
});
```

It's very easy to create async helpers, all they need to do is `return wait();` at the end of the helper.