     @runner.emit 'test:error', name: @description, error: @error
 
 class ExampleGroupWithoutHooks
-  constructor: (@assertions, @context, @blocks, @onFinish, @onError)-> @nextIndex = 0
+  constructor: (@assertions, @binding, @bare, @blocks, @onFinish, @onError)-> @nextIndex = 0
 
   run: ->
     @wasSuccessful = true

    @onFinish error

  runAround: (befores, afters, onFinish, block)->
    new AroundBlock(befores, afters, block).run @runner, @assertions, @context, onFinish

  processDescriptionBlock: (onFinish)=>
    context = @context or @dsl
    @block.call context, context
    @runAround @dsl._beforeAllBlocks_, @dsl._afterAllBlocks_, onFinish, (@onExamplesFinished)=>
      @runNextStep()


  describe:  (description, block)=>
    @_examples_.push new Description(description, block, @_beforeBlocks_, @_afterBlocks_)
  example:   (description, block)=>
    throw new Error("Examples must have a description and a block") unless description and block
    @_examples_.push new ExampleWithHooks(description, @_beforeBlocks_, @_afterBlocks_, block)
  pending:   (description)=> @_examples_.push {description, pending: true}

class AroundBlock
  constructor: (@beforeBlocks, @afterBlocks, @block)->

  run: (@runner, @assertions, @binding, @bare, @onFinish)->
    @runGroup @beforeBlocks, ((e)=> @onBeforeError e), (wasSuccessful)=>
      if wasSuccessful
        @runMainBlock @block, (error)=>
          @registerError error if error
          @runAfterGroup()
      else @runAfterGroup()

