       @buffer.stderr += data
       @hasErrorText data
 
+
+
+  @getDefaultRootUrl: ->
+    log.debug "Meteor.getDefaultRootUrl()"
+    port = process.env.SPACEJAM_PORT || # TODO: Remove if unnecessary
+      process.env.PORT ||
+      4096
+    rootUrl = "http://localhost:#{port}/"
+    return rootUrl
+
+
+
+  # TODO: Test
   _globPackages: (app,packages)-> # Use glob to get packages that match the packages arg
     log.debug "Meteor._globPackages()",arguments
-    expect(packages,"Invalid @packages").to.be.an "array"
+    expect(app,"@app should be a string").to.be.a "string"
+    expect(packages,"@packages should be and array").to.be.an "array"
 
     matchedPackages = []
 

      @emit "error"


  hasReadyText: ( buffer )=>
    if buffer.lastIndexOf( @testPackagesOpts()["meteor-ready-text"] ) isnt -1
      @emit "ready"

  kill:->
    @childProcess?.child?.kill()


module.exports = Meteor


    log.debug "Meteor.run()",arguments
    log.info("Spawning meteor")



  # @opts
  # @parseCommandLine
  testPackages: (opts,parseCommandLine=true)=>
    log.debug "Meteor.testPackages()"
    log.info("Spawning meteor")
    expect(opts,"@opts should be an object.").to.be.an "object"
    expect(parseCommandLine,"@parseCommandLine should be a boolean.").to.be.a "boolean"

    expect(@childProcess,"Meteor's child process is already running").to.be.null
    opts = _.extend(@defaultOpts(),opts)
    opts = _.extend(@testPackagesOpts(),opts)

