       assert.isTrue sg.properties instanceof SchemaProperties
 
   describe 'setProperties', ->
-  describe 'setProperties', ->
     before ->
       sg.setProperties keysStrict: true, valuesStrict: true, typesStrict: true
 

{assert} = require('chai')
amanda = require 'amanda'

sampleJsonNoValid = '''
{a:1}
'''

sampleJson = '''
{

  describe 'generate', ->
    schema = undefined
    before ->
      sg.setProperties keysStrict: true, valuesStrict: true, typesStrict: true
      schema = sg.generate()

    it 'should set @schema', ->
      assert.isDefined sg.schema

    it 'and returned schema should be equal', ->
      assert.equal schema, sg.schema

    it 'and schema should be valid json', ->
      assert.doesNotThrow () -> JSON.stringify schema

    it 'which is valid json schema for amanda (doesNotThrow)', ->
      assert.doesNotThrow () -> amanda.validate  sampleJson, sg.schema, (error) ->
        return

    it 'which is expected strict schema', ->
      assert.deepEqual JSON.parse(sampleJsonSchema),  sg.schema

  describe 'generate non strict schema', ->
    before ->
      sg.setProperties keysStrict: false, valuesStrict: false, typesStrict: false

    it 'should be expected non strict schema', ->
      assert.deepEqual JSON.parse(sampleJsonSchemaNonStrict),  sg.generate()




