const TrailsCore = require('trails-core')
const App = require('../../')
const core = new TrailsCore()

before(done => {
  return core
    .configure(App.config, App.pkg)
    .then(() => core.initialize(App.api))
    .then(app => {
      return app.start()
    })
    .catch(err => {
      done(err)
      global.app.log.error(err)
      return global.app.stop()
    })
})

after(() => {
  return global.app.stop()
})

@@ -5,20 +5,19 @@
 t Trails
-Core
+App
  = requi
@@ -27,20 +27,19 @@
 'trails-
-core
+app
 ')%0Aconst
@@ -69,20 +69,19 @@
 )%0Aconst 
-core
+app
  = new T
@@ -89,16 +89,19 @@
 ails
-Core(
+App(App
 )%0A%0A
+%0A
 befo
@@ -126,246 +126,34 @@
 urn 
-core%0A    .configure(App.config, App.pkg)%0A    .then(() =%3E core.initialize(App.api))%0A    .then(app =%3E %7B%0A      return app.start()%0A    %7D)%0A    .catch(err =%3E %7B%0A      done(err)%0A      global.app.log.error(err)%0A      return global.app.stop()%0A    %7D
+app.start().catch(app.stop
 )%0A%7D)

boots! npm test passes