spec/lib/jspec.js
function(file, callback) {
      if (any(hook('loading', file), haveStopped)) return
      if ('readFile' in main)
        return readFile(file)
      else if (this.hasXhr()) {
        var request = this.xhr()
        request.open('GET', file, false)
        request.send(null)
        if (request.readyState == 4 && 
           (request.status == 0 || 
            request.status.toString().charAt(0) == 2)) 
          return request.responseText
      }
      else
        error("failed to load `" + file + "'")
    }
function(file, callback) {
      if (any(hook('loading', file), haveStopped)) return
      if ('readFile' in main)
        return readFile(file)
      else if (this.hasXhr()) {
        var request = this.xhr()
        request.open('GET', file, false)
        request.send(null)
        if (request.readyState == 4 && 
           (request.status == 0 || 
            request.status.toString().charAt(0) == 2)) 
          return request.responseText
      }
      else
        error("failed to load `" + file + "'")
    }
function ( file , callback ) { if ( any ( hook ( 'loading' , file ) , haveStopped ) ) return if ( 'readFile' in main ) return readFile ( file ) else if ( this . hasXhr ( ) ) { var request = this . xhr ( ) request . open ( 'GET' , file , false ) request . send ( null ) if ( request . readyState == 4 && ( request . status == 0 || request . status . toString ( ) . charAt ( 0 ) == 2 ) ) return request . responseText } else error ( "failed to load `" + file + "'" ) }
Load a _file_'s contents.

@param  {string} file
@param  {function} callback
@return {string}
@api public
Load a _file_ s contents .