 
     describe 'run test with hooks only indicated by `hooks-only`', () ->
 
-      testFactory = new TestFactory()
-      test = testFactory.create()
-      test.name = 'GET /machines -> 200'
-      test.request.path = '/machines'
-      test.request.method = 'GET'
-      test.response.status = 200
-      test.response.schema = {}
-
-      suiteStub = ''
-
-      before (done) ->
+      suiteStub = undefined
+
+      before (done) ->
+        testFactory = new TestFactory()
+        test = testFactory.create()
+        test.name = 'GET /machines -> 200'
+        test.request.path = '/machines'
+        test.request.method = 'GET'
+        test.response.status = 200
+        test.response.schema = {}
+
         options =
           server: "#{SERVER}"
           'hooks-only': true

            done()

      after () ->
        beforeAllHook = ''
        afterAllHook = ''

      it 'should call afterAll hook', () ->
        afterAllHook.should.have.been.called


    describe 'when test throws AssertionError', () ->

      afterAllHook = undefined

      before (done) ->
        testFactory = new TestFactory()
