       done()
 
 describe 'callback_error plugin', ->
+
+  liar = {}
 
   before ->
 

expect      = chai.expect
create_liar = require '../create_liar'


liar = {}

describe 'callback_result plugin', ->

  before ->
    create_liar.plugins.callback_result = (obj) ->

      done()


describe 'promise_done plugin', ->

  liar = {}

  before ->
    create_liar.plugins.promise_done = (obj) ->
      returns:
        on_value:
          function_name: 'done'
          yields_in_order: [
            argument_1:
              value: obj
          ]

    liar = create_liar [
      function_name: 'meow_async'
      promise_done: 'Meow!'
    ]

    it 'should behave as expected', (done) ->
      liar.meow_async().done (result) ->
        result.should.equal 'Meow!'
        done()

describe 'promise_fail plugin', ->

  liar = {}

  before ->
    create_liar.plugins.promise_fail = (obj) ->
      returns:
        on_value: [
          function_name: 'fail'
          yields_in_order: [
            argument_1:
              value: obj
          ]
        ]

    liar = create_liar [
      function_name: 'meow_async'
      promise_fail: "Dogs don't meow!"
    ]

  it 'should behave as expected', ->
    liar.meow_async().fail (error) ->
      error.should.equal "Dogs don't meow!"