Fix adapter

This commit is contained in:
Jan Renz
2015-06-18 19:04:35 +02:00
parent fc68b3b3b0
commit 7f5a76038f

View File

@ -7,10 +7,10 @@ class MochaAdapter < TestingFrameworkAdapter
end end
def parse_output(output) def parse_output(output)
matches_success = SUCCESS_REGEXP.match(output[:stderr]) matches_success = SUCCESS_REGEXP.match(text)
matches_failed = FAILURES_REGEXP.match(output[:stderr]) matches_failed = FAILURES_REGEXP.match(text)
failed = matches_failed ? matches_failed.captures.try(:first).to_i : 0 failed = matches_failed ? matches_failed.captures.first.to_i : 0
success = matches_success ? matches_success.captures.try(:first).to_i : 0 success = matches_success ? matches_success.captures.first.to_i : 0
{count: success+failed, failed: failed} {count: success+failed, failed: failed}
end end
end end