2015-02-13 07:22:32 +03:00
|
|
|
import Ember from 'ember';
|
|
|
|
import Application from '../../app';
|
|
|
|
import config from '../../config/environment';
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
const {merge, run} = Ember;
|
|
|
|
|
2015-09-03 13:03:45 +03:00
|
|
|
export default function startApp(attrs) {
|
2015-10-28 14:36:45 +03:00
|
|
|
let attributes = merge({}, config.APP);
|
|
|
|
let application;
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
// use defaults, but you can override;
|
|
|
|
attributes = merge(attributes, attrs);
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
run(function () {
|
2015-02-19 03:11:42 +03:00
|
|
|
application = Application.create(attributes);
|
|
|
|
application.setupForTesting();
|
|
|
|
application.injectTestHelpers();
|
|
|
|
});
|
2015-02-13 07:22:32 +03:00
|
|
|
|
2015-02-19 03:11:42 +03:00
|
|
|
return application;
|
2015-02-13 07:22:32 +03:00
|
|
|
}
|