 
     describe 'Interact with #test', () ->
 
-      test = undefined
-      runner = undefined
+      before (done) ->
+        test = createStdTest()
+        test.response.status = 200
+        test.response.schema = """[
+          type: 'string'
+          name: 'string'
+        ]"""
+
+        options =
+          server: "#{ABAO_IO_SERVER}"
+
+        runner = new TestRunner options, ''
+        sinon.stub test, 'run'
+          .callsFake (callback) ->
+            callback()
+
+        # Mute stdout/stderr
+        mute (unmute) ->
+          runner.run [test], hooksStub, () ->
+            unmute()
+            done()
+
+      after () ->
+        test.run.restore()
+        runner = undefined
+        test = undefined
+
+      it 'should call #test.run', () ->
+        assert.ok test.run.calledOnce
+
+
+    describe 'when test has no response code', () ->
 
       before (done) ->
         testFactory = new TestFactory()

      runCallback = 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 = """[
          type: 'string'

            done()

      after () ->
        afterAllHook = undefined
        runner = undefined
        test = undefined

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


    describe 'when beforeAllHooks throws UncaughtError', () ->

      beforeAllHook = undefined
      afterAllHook = undefined

      before (done) ->
        test = createStdTest()
        test.response.status = 200

        beforeAllHook = sinon.stub()
        beforeAllHook.throws('Error')
        afterAllHook = sinon.stub()
        afterAllHook.callsArg(0)

        hooksStub.beforeAllHooks = [beforeAllHook]
        hooksStub.afterAllHooks = [afterAllHook]

        options =
          server: "#{SERVER}"

        runner = new TestRunner options, ''
        sinon.stub test, 'run'
          .callsFake (callback) ->
            callback()

        # Mute stdout/stderr
        mute (unmute) ->
