-global.log = require("loglevel")
 chai = require("chai")
 expect = chai.expect
 sinon = require("sinon")

chai.use(sinonChai)
Meteor = require "../src/Meteor"
ChildProcess = require "../src/ChildProcess"

#TODO give all tests 30000 other than the timeout test

describe "Meteor class Test", ->
  @timeout 30000


  globPackagesStub = null

  defaultTestPort = 4096

  defaultDriverPackage = "test-in-console"

  testPackage = "package"

  env = process.env

  expectedSpawnOptions = { cwd: "app", detached: false, env: env }



  before ->
    log.setLevel "error"
    delete process.env.PORT
    delete process.env.ROOT_URL
    delete process.env.MONGO_URL
    delete process.env.SPACEJAM_PORT



  beforeEach ->
    meteor = new Meteor()
    spawnStub = sinon.stub(ChildProcess.prototype,"spawn")
    globPackagesStub = sinon.stub(meteor,"_globPackages")
    globPackagesStub.returns [testPackage]



