emberjs/ember-dev — pull request #123 by mixonic (2014-01-16 05:30:56+00:00)
Title: Introduce a new async deprecation helper

Let's get all crazy. @stefanpenner et. al.

This adds a far more robust `expectDeprecation` helper than Ember tests had previously. It adds any expectations to an array, and logs any deprecations on another. After every test, it check all the expectations against all the deprecations to see if any do not match up. Here is the most common use:

```
test("A templateName specified to a component is moved to the layoutName", function(){
expectDeprecation(/Do not specify templateName on a Component, use layoutName instead/);
component = Ember.Component.extend({
templateName: 'blah-blah'
}).create();

equal(component.get('layoutName'), 'blah-blah', "The layoutName now contains the templateName specified.");
});
```

But this is backward compatible to the old accept-a-function method.

Once this is in, I can make a PR on Ember.js [using this new method most everywhere possible](https://github.com/mixonic/ember.js/compare/emberjs:master...mixonic:async-deprecate). Open to feedback, happy to answer any questions.