 proxyquire = require('proxyquire').noCallThru()
 
 fsStub = require 'fs'
-Drafter = require 'drafter'
+DrafterClassStub = require 'drafter'
 requestStub = require 'request'
 loggerStub = require '../../src/logger'
 

blueprintAstToRuntimeStub = sinon.spy blueprintAstToRuntime

Dredd = proxyquire '../../src/dredd', {
  'drafter': Drafter
  'request': requestStub
  './blueprint-ast-to-runtime': blueprintAstToRuntimeStub
  'fs': fsStub

        dredd.runner.executeTransaction.restore()
        done()

    it 'should parse blueprint to ast', (done) ->
      dredd = new Dredd(configuration)
      sinon.stub dredd.runner, 'executeTransaction', (transaction, callback) ->
        callback()
      dredd.run (error) ->
        assert.ok DrafterClassStub::make.called
        dredd.runner.executeTransaction.restore()
        done()

