emberjs/ember-dev — pull request #134 by mixonic (2014-10-19 14:56:39+00:00)
Title: Replace Ember Dev with an Ember-CLI Addon

We've had some discussion about making ember-dev useful again. Specifically, about replacing the Ruby package (which is not un-used by any Ember projects) with a package for sharing test helpers and build pipeline tools.

Here I've generated an ember-cli addon, ported the assertion, deprecation, remaining views, and remaining templates helpers to ES6 with tests.

Getting this into Ember should be pretty straight ahead. There is an `EmberDevTestHelperAssert` with several methods on an instance:

* `reset` - clear any leaking values between assertions
* `inject` - add `window.expectedDeprecation` and other window-level or Ember-level functions
* `assert` - a hook to call at the end of tests to make an final end-of-test assertions
* `restore` - teardown the injected functions

And these hooks are then fired on each of the individual test helpers.

Example usage might look like:

```
var deprecationAssert = new DeprecationAssert({ Ember: Ember, runningProdBuild: false });

QUnit.testStart(function(){
deprecationAssert.reset();
deprecationAssert.inject();
});

QUnit.testDone(function(){
deprecationAssert.assert();
deprecationAssert.restore();
});

test("should assert", function(){
expectDeprecation(/some deprecation/);
});
```

Could be done with any individual helper or with `EmberDevTestHelperAssert` or a custom collection of helpers.