 
   describe '#create()', ->
 
+    options             =
+      label             : generateRandomString()
+      ipAddress         : '127.0.0.1'
+      queryString       : '1/2/3/4/5/6/7/8'
+
+    expectedQueryString = "///////#{options.queryString.split('/').reverse()[0]}"
+
     it 'should be able to create required managed vm data', (done) ->
 
       withConvertedUser ({ client, account, user, group }) ->
         client.r = { account, user, group }
-
-        options =
-          label       : generateRandomString()
-          ipAddress   : '127.0.0.1'
-          queryString : '1/2/3/4/5/6/7/8'
-
-        expectedQueryString = "///////#{options.queryString.split('/').reverse()[0]}"
 
         Managed.create client, options, (err, managedVm) ->
           expect(err).to.not.exist

          done()


  describe '#postCreate()', ->

    it 'should update machine and create workspace', (done) ->

{ withConvertedUserAnd } = require \
  '../../../../testhelper/models/computeproviders/computeproviderhelper'

async           = require 'async'
Managed         = require './managed'
JMachine        = require './machine'
JWorkspace      = require '../workspace'
ComputeProvider = require './computeprovider'

# this function will be called once before running any test
beforeTests = -> before (done) ->
