       before (done) ->
         ramlFile = "#{RAML_DIR}/machines-inline_and_included_schemas.raml"
         ramlParser.loadFile(ramlFile)
-        .then (raml) ->
-          callback = sinon.stub()
-          callback.returns(done())
-
-          addTests raml, tests, hooks, callback, testFactory, false
-        .catch (err) ->
-          console.error err
-          done(err)
+          .then (raml) ->
+            callback = sinon.stub()
+            callback.returns(done())
+
+            addTests raml, tests, hooks, callback, testFactory, false
+          .catch (err) ->
+            console.error err
+            done(err)
         return
 
       after () ->

      before (done) ->
        ramlFile = "#{RAML_DIR}/machines-no_method.raml"
        ramlParser.loadFile(ramlFile)
        .then (raml) ->
          callback = sinon.stub()
          callback.returns(done())

          addTests raml, tests, hooks, callback, testFactory, false
        .catch (err) ->
          console.error err
          done(err)
        return

      after () ->

      before (done) ->
        ramlFile = "#{RAML_DIR}/machines-non_required_query_parameter.raml"
        ramlParser.loadFile(ramlFile)
          .then (raml) ->
            callback = sinon.stub()
            callback.returns(done())

            addTests raml, tests, hooks, callback, testFactory, false
          .catch (err) ->
            console.error err
            done(err)
        return

      after () ->
