cms/app-client/tests/helpers/start-app.js
author ymh <ymh.work@gmail.com>
Thu, 14 Jan 2016 18:35:23 +0100
changeset 25 4ce76c9e7729
parent 5 d4b3da0dadc9
child 136 5fed7e1716c2
permissions -rw-r--r--
small corrections

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

export default function startApp(attrs) {
  var application;

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

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

  return application;
}