define(['DomComponents/model/Component',
        'DomComponents/model/ComponentImage',
        'DomComponents/model/ComponentText',
        'DomComponents/model/Components'],
	function(Component, ComponentImage, ComponentText, Components) {

    return {
      run : function(){
          var obj;

          describe('Component', function() {

            beforeEach(function () {
              obj = new Component();
            });

            afterEach(function () {
              delete obj;
            });

            it('Has no children', function() {
              obj.get('components').length.should.equal(0);
            });

            it('Clones correctly', function() {
              var sAttr = obj.attributes;
              var cloned = obj.clone();
              var eAttr = cloned.attributes;
              eAttr.components = {};
              sAttr.components = {};
              eAttr.traits = {};
              sAttr.traits = {};
              sAttr.should.deep.equal(eAttr);
            });

            it('Has expected name', function() {
              obj.cid = 'c999';
              obj.getName().should.equal('Box 999');
            });

            it('Has expected name 2', function() {
              obj.cid = 'c999';
              obj.set('type','testType');
              obj.getName().should.equal('TestType 999');
            });

        });

        describe('Image Component', function() {

            beforeEach(function () {
              obj = new ComponentImage();
            });

            afterEach(function () {
              delete obj;
            });

            it('Has src property', function() {
              obj.has('src').should.equal(true);
            });

            it('Not droppable', function() {
              obj.get('droppable').should.equal(false);
            });

        });

        describe('Text Component', function() {

            beforeEach(function () {
              obj  = new ComponentText();
            });

            afterEach(function () {
              delete obj;
            });

            it('Has content property', function() {
              obj.has('content').should.equal(true);
            });

            it('Not droppable', function() {
              obj.get('droppable').should.equal(false);
            });

        });

        describe('Components', function() {

            it('Creates component correctly', function() {
              var c = new Components();
              var m = c.add({});
              m.should.be.an.instanceOf(Component);
            });

            it('Creates image component correctly', function() {
              var c = new Components();
              var m = c.add({ type: 'image' });
              m.should.be.an.instanceOf(ComponentImage);
            });

            it('Creates text component correctly', function() {
              var c = new Components();
              var m = c.add({ type: 'text' });
              m.should.be.an.instanceOf(ComponentText);
            });

        });
      }
    };

});

@@ -1002,32 +1002,456 @@
            %7D);%0A%0A
+            it('Clones correctly with traits', function() %7B%0A              obj.get('traits').at(0).set('value', 'testTitle');%0A              var cloned = obj.clone();%0A              cloned.set('stylable', 0);%0A              cloned.get('traits').at(0).set('value', 'testTitle2');%0A              obj.get('traits').at(0).get('value').should.equal('testTitle');%0A              obj.get('stylable').should.equal(true);%0A            %7D);%0A%0A
             it('

Add trait test