common/corpus-common-addon/tests/helpers/start-app.js
author ymh <ymh.work@gmail.com>
Tue, 13 Dec 2016 23:30:54 +0100
changeset 473 1b8b29c0e95c
parent 456 3a32d2f57429
child 511 fbf4e1afab01
permissions -rw-r--r--
Added tag 0.0.13 for changeset 8b1e24e0ef70

import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';

export default function startApp(attrs) {
  let application;

  // use defaults, but you can override
  let attributes = Ember.assign({}, config.APP, attrs);

  Ember.run(() => {
    application = Application.create(attributes);
    application.setupForTesting();
    application.injectTestHelpers();
  });

  return application;
}