lib/jazrb/jasmine/XMLReporter.js in smparkes-jazrb-0.0.10 vs lib/jazrb/jasmine/XMLReporter.js in smparkes-jazrb-0.0.11
- old
+ new
@@ -135,21 +135,26 @@
var name = [ spec.description ];
while(suite){
name.unshift( suite.description );
suite = suite.parentSuite;
}
- puts(" <testsuite"+formatAttributes({name:name.join(" : ")}) +">");
+ var attrs = {name:name.join(" : ")};
+ if(spec.pending) {
+ attrs.skipped = "true";
+ }
+ puts(" <testsuite"+formatAttributes(attrs) +">");
jasmine.XMLReporter.current_spec = spec;
this.results_[spec.id] = {
spec: spec,
messages: spec.results().getItems(),
result: spec.results().failedCount > 0 ? "failed" : "passed"
};
var results = spec.results().getItems();
for(var i in results) {
var result = results[i];
- puts(" <testcase"+formatAttributes({name:(1+parseInt(i))+ ": " + result.matcherName})+">");
- if(!result.passed()){
+ var attrs = {name:(1+parseInt(i))+ ": " + result.matcherName};
+ puts(" <testcase"+formatAttributes(attrs)+">");
+ if(!result.passed() && !attrs.skipped){
puts(" <failure"+formatAttributes({type:result.matcherName,
message:result.message})+">");
puts("<![CDATA[");
puts(get_exception_trace(result.trace));
puts("]]>");