Permalink
Browse files

Make the xunit reporter follow the established pattern of using the v…

…ows console module and allowing for overriding the stream.
  • Loading branch information...
1 parent 98470cb commit e10dc94c385bfbcd1182ef2e537800981968fdd0 @adamstallard adamstallard committed Feb 19, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/vows/reporters/xunit.js
@@ -4,7 +4,9 @@
// added, see: http://ant.1045680.n5.nabble.com/schema-for-junit-xml-output-td1375274.html
//
-var puts = require('util').puts;
+var options = { tail: '\n', raw: true };
+var console = require('../../vows/console');
+var puts = console.puts(options);
var buffer = [],
curSubject = null;
@@ -47,6 +49,9 @@ function cdata(data) {
}
this.name = 'xunit';
+this.setStream = function (s) {
+ options.stream = s;
+};
this.report = function (data) {
var event = data[1];

0 comments on commit e10dc94

Please sign in to comment.