code: function SpecXUnitFile(runner) {
    var spec = new Spec(runner);
    Base.call(this, runner);
    var stats = this.stats
      , tests = []
      , self = this;
    runner.on('suite', function(suite){
      if(consoleOutput.suite){
        console.log('  ' + suite.title);
      }
    });
  
    runner.on('test', function(test){
      if(consoleOutput.test){
        console.log('  ◦ ' + test.title);
      }
    });
  
    runner.on('pass', function(test){
      tests.push(test);
    });
  
    runner.on('fail', function(test){
      if(consoleOutput.fail){
        console.log('  - ' + test.title);
      }
      tests.push(test);
    });
  
    runner.on('pending', function(test) {
      tests.push(test);
    });
  
    runner.on('end', function(){
  
      var filePath = process.env.XUNIT_FILE || config.file || process.cwd() + "/xunit.xml"
        , fd = fs.openSync(filePath, 'w', 0755)
        ;
      appendLine(fd, writeTag('testsuite', {
        name: 'Mocha Tests'
        , tests: stats.tests
        , failures: stats.failures
        , errors: stats.failures
        , skipped: stats.tests - stats.failures - stats.passes
        , timestamp: (new Date()).toUTCString()
        , time: stats.duration / 1000
      }, false));
  
      tests.forEach(function(test){
        writeTest(fd, test);
  
      });
      appendLine(fd, '</testsuite>');
      fs.closeSync(fd);
    });
  
  }
docs: Initialize a new `SpecXUnitFile` reporter.
  
  @param {Runner} runner
  @api public