 
     context 'called with object expansion', ->
       it 'should convert s to \'\'', ->
-        wrapped = varity 's+s', @callback
+        wrapped = $ 's+s', @callback
         wrapped 'string'
         @callback.calledWith('string', '').should.be.true
 
       it 'should convert String to \'\'', ->
-        wrapped = varity 'String', '+String', @callback
+        wrapped = $ 'String', '+String', @callback
         wrapped 'string'
         @callback.calledWith('string', '').should.be.true
 
       it 'should convert Function to ->', ->
-        wrapped = varity 'String', '+Function', @callback
+        wrapped = $ 'String', '+Function', @callback
         wrapped 'string'
         @callback.args[0][0].should.equal('string')
         @callback.args[0][1].toString().should.equal('function (){}')
 
       it 'should convert f to ->', ->
-        wrapped = varity 's+f', @callback
+        wrapped = $ 's+f', @callback
         wrapped 'string'
         @callback.args[0][0].should.equal('string')
         @callback.args[0][1].toString().should.equal('function (){}')
 
       it 'should convert o to {}', ->
-        wrapped = varity 's+of', @callback
+        wrapped = $ 's+of', @callback
         fn = ->
         wrapped 'string', fn
         @callback.calledWith('string', {}, fn).should.be.true
 
       it 'should convert Object to {}', ->
-        wrapped = varity 'String', '+Object', @callback
+        wrapped = $ 'String', '+Object', @callback
         wrapped 'string'
         @callback.calledWith('string', {}).should.be.true
         
       it 'should convert A to []', ->
-        wrapped = varity 's+A', @callback
+        wrapped = $ 's+A', @callback
         wrapped 'string'
         @callback.calledWith('string', []).should.be.true
 
       it 'should convert Array to []', ->
-        wrapped = varity 'String', '+Array', @callback
+        wrapped = $ 'String', '+Array', @callback
         wrapped 'string'
         @callback.calledWith('string', []).should.be.true
 
       it 'should convert Number to 0', ->
-        wrapped = varity 'String', '+Number', @callback
+        wrapped = $ 'String', '+Number', @callback
         wrapped 'string'
         @callback.calledWith('string', 0).should.be.true
 
       it 'should convert 1 to 0', ->
-        wrapped = varity 's+1', @callback
+        wrapped = $ 's+1', @callback
         wrapped 'string'
         @callback.calledWith('string', 0).should.be.true
 
       it 'should convert Boolean to false', ->
-        wrapped = varity 'String', '+Boolean', @callback
+        wrapped = $ 'String', '+Boolean', @callback
         wrapped 'string'
         @callback.calledWith('string', false).should.be.true
 
       it 'should convert b to false', ->
-        wrapped = varity 's+b', @callback
+        wrapped = $ 's+b', @callback
         wrapped 'string'
         @callback.calledWith('string', false).should.be.true
 
       it 'should convert RegExp to /.*/', ->
-        wrapped = varity 'String', '+RegExp', @callback
+        wrapped = $ 'String', '+RegExp', @callback
         wrapped 'string'
         @callback.calledWith('string', /.*/).should.be.true
 
       it 'should convert r to []', ->
-        wrapped = varity 's+r', @callback
+        wrapped = $ 's+r', @callback
         wrapped 'string'
         @callback.calledWith('string', /.*/).should.be.true
 
       it 'should convert Date to today\'s date', ->
-        wrapped = varity 'String', '+Date', @callback
+        wrapped = $ 'String', '+Date', @callback
         d = new Date()
         wrapped 'string'
         @callback.args[0][0].should.equal('string')


  context 'called with special types', ->
    it 'should accept null', ->
      wrapped = varity null, @callback
      wrapped null
      @callback.calledWith(null).should.be.true

    it 'should accept undefined', ->
      wrapped = varity undefined, @callback
      wrapped undefined
      @callback.calledWith(undefined).should.be.true

    it 'should accept multiple special parameters', ->
      wrapped = varity null, undefined, @callback
      wrapped null, undefined
      @callback.calledWith(null, undefined).should.be.true

    it 'should accept multiple special parameters with duplicate', ->
      wrapped = varity null, null, undefined, null, @callback
      wrapped null, null, undefined, null
      @callback.calledWith(null, null, undefined, null).should.be.true

  context 'called with mixed types', ->
    it 'should accept any combination of types (part 1)', ->
      wrapped = varity 'string', Function, null, @callback
      fn = ->
      wrapped 'string', fn, null
      @callback.calledWith('string', fn, null).should.be.true

    it 'should accept any combination of types (part 2)', ->
      wrapped = varity 'string', Function, Function, 'object', Object, null, undefined, Date, 'regexp', @callback
      fn1 = ->
      fn2 = ->
      obj1 = {}

      obj = {}
      arr = []
      fn = ->
      wrapped = $ 'string', 'object', 'array', 'function', @callback
      wrapped('something', obj, arr, fn)
      @callback.calledWith('something', obj, arr, fn).should.be.true

    it 'should accept multiple string parameters with duplicates', ->
      fn1 = ->
      fn2 = ->
      wrapped = $ 'function', 'function', @callback
      wrapped(fn1, fn2)
      @callback.calledWith(fn1, fn2).should.be.true

  context 'called with actual types', ->
    it 'should accept String', ->
      wrapped = $ String, @callback
      wrapped 'string'
      @callback.calledWith('string').should.be.true

    it 'should accept Function', ->
      wrapped = $ Function, @callback
      fn = ->
      wrapped fn
      @callback.calledWith(fn).should.be.true

    it 'should accept Object', ->
      wrapped = $ Object, @callback
      obj = {}
      wrapped obj
      @callback.calledWith(obj).should.be.true

    it 'should accept Array', ->
      wrapped = $ Array, @callback
      arr = []
      wrapped arr
      @callback.calledWith(arr).should.be.true

    it 'should accept Number', ->
      wrapped = $ Number, @callback
      wrapped 2
      @callback.calledWith(2).should.be.true

    it 'should accept Boolean', ->
      wrapped = $ Boolean, @callback
      wrapped true
      @callback.calledWith(true).should.be.true

    it 'should accept Date', ->
      wrapped = $ Date, @callback
      date = new Date()
      wrapped date
      @callback.calledWith(date).should.be.true

    it 'should accept RegExp', ->
      wrapped = $ RegExp, @callback
      reg = /.*/
      wrapped reg
      @callback.calledWith(reg).should.be.true

    it 'should accept Error', ->
      wrapped = $ Error, @callback
      e = new Error()
      wrapped e
      @callback.calledWith(e).should.be.true

    it 'should accept multiple type parameters', ->
      wrapped = $ String, Function, Object, Array, RegExp, Date, @callback
      fn = ->
      obj = {}
      arr = []
