mongodb-expressions
Version:
MongoDB expressions for fire.js
28 lines (24 loc) • 904 B
JavaScript
var vows = require('vows')
var assert = require('assert')
var FireRuntime = require('fire').Runtime
var configRuntime = require('./util').configRuntime
var dropCollection = require('./util').dropCollection
require('./runtimeExtensions.js')
vows.describe('Mongo Default Configurations').addBatch({
"When I run an application with default configuration": {
topic: function() {
var self = this
var runtime = new FireRuntime()
runtime.applicationName = "SampleApp"
runtime.environmentName = "production"
configRuntime(runtime, function(initError){
self.callback(initError, runtime)
}, true)
},
"the database name should be the name of the app plus the environment name": function(err, runtime) {
assert.isNull(err)
var config = runtime.getModuleConfiguration('mongodb-expressions')
assert.equal(config['generic'].db, "SampleApp_production")
}
}
}).export(module);