var chai = require('chai');
var expect = chai.expect;

var promptModuleOptionsModule = require('../bin/promptModuleOptions');

chai.should();

describe('As a user of the prompt module options module', function() {

	var moduleOptionsData;

	this.timeout(5000);

	before(function() {
		promptModuleOptionsModule.setup({
			silent: true
		});
	})

	describe('When getting module data', function() {

		beforeEach(function(done) {

			promptModuleOptionsModule
				.getOptions()
				.then(function(moduleData) {
					moduleOptionsData = moduleData;
					done();
				})
		})

		it('should return an array', function() {
			expect(moduleOptionsData).to.be.a('array');
		})

		it('should return a collection (array of objects)', function() {
			moduleOptionsData.forEach(function(singleModule) {
				expect(singleModule).to.be.a('object');
			})
		})

	})

})
@@ -46,16 +46,42 @@
 .expect;
+%0Avar assert = chai.assert;
 %0A%0Avar pr
@@ -870,10 +870,743 @@
 )%0A%0A%09%7D)%0A%0A
+%09describe('When reading each module object', function() %7B%0A%0A%09%09it('should have the %60name%60 key', function() %7B%0A%09%09%09moduleOptionsData.forEach(function(singleModule) %7B%0A%09%09%09%09expect(singleModule.name).to.exist;%0A%09%09%09%7D)%0A%09%09%7D)%0A%0A%09%09it('should contain the %60name%60 key and be string', function() %7B%0A%09%09%09moduleOptionsData.forEach(function(singleModule) %7B%0A%09%09%09%09expect(singleModule.name).to.be.a('string');%0A%09%09%09%7D)%0A%09%09%7D)%0A%0A%09%09it('should have the %60checked%60 key', function() %7B%0A%09%09%09moduleOptionsData.forEach(function(singleModule) %7B%0A%09%09%09%09expect(singleModule.checked).to.exist;%0A%09%09%09%7D)%0A%09%09%7D)%0A%0A%09%09it('should have the %60checked%60 key and be boolean', function() %7B%0A%09%09%09moduleOptionsData.forEach(function(singleModule) %7B%0A%09%09%09%09assert.isBoolean(singleModule.checked)%0A%09%09%09%7D)%0A%09%09%7D)%0A%0A%09%7D)%0A%0A
 %7D)

Add test to check required keys exist for module object