Fix adapter

This commit is contained in:
Jan Renz
2015-06-18 19:34:28 +02:00
parent 7f5a76038f
commit 278e30ccf8

View File

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