var should = require('should'),
locomotive = require('locomotive'),
mongoose = require('mongoose');
chai = require('chai'),
expect = chai.expect,
chaiHttp = require('chai-http');
chai.use(chaiHttp);
describe('Application', function () {
var self = this;
var app;
before(function(done) {
// boot LocomotiveJS app
var lcm = new locomotive.Locomotive();
lcm.boot('test', function() {
app = lcm.express;
console.log('app', app);
app.listen(3000, function() {
var addr = this.address();
console.log('started', addr);
done();
});
});
});
it('should have started the app', function(){
should.exist(app);
});
it('should have loaded the home page', function () {
chai.request(app)
.get('/')
.res(function(res) {
console.log('res', res.text);
expect(res).to.have.status(200);
});
});
});