On 13 March 2014 12:19, Juan Martin Runge <notifications@github.com> wrote:
>
> In backends.js:
>
> > @@ -0,0 +1,85 @@
> > +var mbc            = require('mbc-common'),
> > +    search_options = mbc.config.Search,
> > +    collections    = mbc.config.Common.Collections,
> > +    backboneio     = require('backbone.io'),
> > +    middleware     = new mbc.iobackends().get_middleware()
> > +;
> > +
> > +var test_conf = {
> > +    db: {
> > +        dbName: 'mediatestdb',
> > +        dbHost: 'localhost',
> > +        dbPort: 27017
> > +    }
> > +};
> > +var test_db = mbc.db(test_conf.db);
>
> Please keep test code inside tests... You can pass db to the constructor of this function and mosto server also receives the db object and can pass it alongside when calling this...

Alright. Some tests do  require() of mosto.js and create some things
on the db. We can either move the connection info for the test db
somewhere else here (inside mosto) or add it as another  config option
and passing that to the call to mbc.db()