 Attributes      = require '../src/attributes/'
 setImmediate    = setImmediate || process.nextTick
 register        = TypeInfo.register
+attrs = null
 
 class TestType
   constructor: ->return super
-  $attributes: Attributes
+  $attributes: attrs = Attributes
+    haha: 'Boolean'
     min:
+      name: 'min'
       type: 'Number'
       value: 1
     max:

    t.should.have.property 'min', 1
    t.should.have.property 'max', 2
    t.should.have.property 'name', 'Test'

    result.should.be.true
  after ->
    TypeInfo.unregister 'Test'

  it "should get type info object directly", ->
    t = TestType()
    should.exist t
