                     { name: 'latitude' }
                 ]
             ])
-            simpleEnumerationDefinition = simpleEnumerationSchema.definitions.Coordinates
+            enumerationDefinition = simpleEnumerationSchema.definitions.Coordinates
 
         it 'should describe enumerations as extended definition', ->
             expect(simpleEnumerationSchema.definitions).to.have.property('Coordinates')
 
         it 'should describe enumeration as arrays with strict item count', ->
-            expect(simpleEnumerationDefinition).to.have.property('type', 'array')
-            expect(simpleEnumerationDefinition).to.have.property('maxItems', 2)
-            expect(simpleEnumerationDefinition).to.have.property('minItems', 2)
+            expect(enumerationDefinition).to.have.property('type', 'array')
+            expect(enumerationDefinition).to.have.property('maxItems', 2)
+            expect(enumerationDefinition).to.have.property('minItems', 2)
 
         it 'should list array item names', ->
-            expect(simpleEnumerationDefinition).to.have.property('elements').deep.equal([
+            expect(enumerationDefinition).to.have.property('elements').deep.equal([
                 'longitude'
                 'latitude'
             ])
 
         it 'should refer to destructured object definition', ->
-            expect(simpleEnumerationDefinition).to.have.property('destructuredTo')
-            expect(simpleEnumerationDefinition.destructuredTo)
+            expect(enumerationDefinition).to.have.property('destructuredTo')
+            expect(enumerationDefinition.destructuredTo)
                 .to.have.property('$ref', '#/definitions/Coordinates/definitions/__Coordinates__')
 
         it 'should generate definition for object to which array should be converted', ->
-            expect(simpleEnumerationDefinition.definitions).to.have.property('__Coordinates__')
+            expect(enumerationDefinition.definitions).to.have.property('__Coordinates__')
             
         
         describe 'destructured object definition', ->
-            simpleDestructuredObjectDefinition = null
+            destructuredObjectDefinition = null
 
             beforeEach ->
-                simpleDestructuredObjectDefinition =
-                    simpleEnumerationDefinition.definitions.__Coordinates__
+                destructuredObjectDefinition =
+                    enumerationDefinition.definitions.__Coordinates__
             
             it 'should be a definition', ->
-                expect(simpleDestructuredObjectDefinition).to.have.property('title', '__Coordinates__')
-                expect(simpleDestructuredObjectDefinition).to.have.property('type', 'object')
+                expect(destructuredObjectDefinition).to.have.property('title', '__Coordinates__')
+                expect(destructuredObjectDefinition).to.have.property('type', 'object')
 
             it 'should describe destructured properties', ->
-                expect(simpleDestructuredObjectDefinition).to.have.property('properties')
-                expect(simpleDestructuredObjectDefinition.properties).to.have.property('longitude')
-                expect(simpleDestructuredObjectDefinition.properties).to.have.property('latitude')
+                expect(destructuredObjectDefinition).to.have.property('properties')
+                expect(destructuredObjectDefinition.properties).to.have.property('longitude')
+                expect(destructuredObjectDefinition.properties).to.have.property('latitude')
 
             it 'should restrict properties exactly to what was destructured from array', ->
-                expect(simpleDestructuredObjectDefinition).to.have.property('additionalProperties', false)
-                expect(simpleDestructuredObjectDefinition).to.have.property('required').deep.equal([
+                expect(destructuredObjectDefinition).to.have.property('additionalProperties', false)
+                expect(destructuredObjectDefinition).to.have.property('required').deep.equal([
                     'longitude'
                     'latitude'
                 ])
 
 
     describe 'indexes', ->
-        simpleIndexSchema = null
-
-        beforeEach ->
-            simpleIndexSchema = postprocessor.postprocess([
+        indexSchema = null
+
+        beforeEach ->
+            indexSchema = postprocessor.postprocess([
                 type: 'object'
                 rule: 'definition'
                 isMainDefinition: true

            ])

        it 'should save relations to dedicated hash', ->
            expect(simpleRelationDefinition.relations).to.have.property('author')

        it 'should save relation direction', ->
            expect(simpleRelationDefinition.relations.author.out).to.have.property('name', 'CREATED_BY')

        it 'should save relation attributes', ->
            expect(simpleRelationDefinition.relations.author.out).to.have.property('attributes')
            expect(simpleRelationDefinition.relations.author.out.attributes).to.contain('when')

        it 'should treat relations as implicit properties declarations', ->
            expect(simpleRelationDefinition.properties).to.have.property('author')
            expect(simpleRelationDefinition.properties.author).to.have.property('type', 'User')

        it 'should specify what property is managed by relation', ->
            expect(simpleRelationDefinition.relations.author).to.have.property('property', 'author')

        it 'should treat relation attributes as implicit properties declarations', ->
            expect(simpleRelationDefinition.properties).to.have.property('when').deep.equals
                type: 'object'
                title: 'DateTime'


            ])

        it 'should save indexes to dedicated hash', ->
            expect(indexSchema.definitions.Tweet).to.have.property('indexes').deep.equals [
                key: [ 'id' ]
                type: 'unique'
            ]

        it 'should add index properties and make them required if necessary', ->
            expect(indexSchema.definitions.Tweet)
                .to.have.property('properties').deep.equals(id: {})
            expect(indexSchema.definitions.Tweet)
                .to.have.property('required').deep.equals([ 'id' ])


    describe 'relations', ->
        relationDefinition = null

        beforeEach ->
            relationDefinition = postprocessor.postprocess([
                rule: 'relation'
                out:
                    name: 'CREATED_BY'
