<NME> setup-rendering-test-test.js
<BEF> ADDFILE
<MSG> Merge pull request #190 from simonihmig/new-test-api

[WIP] Add support for new RFC268 based testing API
<DFF> @@ -0,0 +1,48 @@
+import Component from '@ember/component';
+import { computed } from '@ember/object';
+import { setupRenderingTest } from 'ember-mocha';
+import { describe, it, beforeEach } from 'mocha';
+import { expect } from 'chai';
+import hbs from 'htmlbars-inline-precompile';
+import { render } from '@ember/test-helpers';
+import hasEmberVersion from 'ember-test-helpers/has-ember-version';
+
+const PrettyColor = Component.extend({
+  classNames: ['pretty-color'],
+  attributeBindings: ['style'],
+  style: computed('name', function() {
+    return 'color: ' + this.get('name') + ';';
+  })
+});
+
+function setupRegistry(owner) {
+  owner.register('component:x-foo', Component.extend());
+  owner.register('component:pretty-color', PrettyColor);
+  owner.register('template:components/pretty-color', hbs`Pretty Color: <span class="color-name">{{name}}</span>`);
+}
+
+describe('setupRenderingTest', function() {
+  if (!hasEmberVersion(2, 4)) {
+    return;
+  }
+
+  describe('pretty-color', function() {
+    setupRenderingTest();
+
+    beforeEach(function() {
+      setupRegistry(this.owner);
+    });
+
+    it('renders with color', async function() {
+      this.set('name', 'green');
+      await render(hbs`{{pretty-color name=name}}`);
+      expect(this.element.textContent.trim()).to.equal('Pretty Color: green');
+    });
+
+    it('renders a second time without', async function() {
+      await render(hbs`{{pretty-color name=name}}`);
+      expect(this.element.textContent.trim()).to.equal('Pretty Color:');
+    });
+  });
+
+});

Merge pull request #190 from simonihmig/new-test-api