improved readability
This commit is contained in:
@ -9,7 +9,7 @@ class JunitAdapter < TestingFrameworkAdapter
|
|||||||
|
|
||||||
def parse_output(output)
|
def parse_output(output)
|
||||||
if SUCCESS_REGEXP.match(output[:stdout])
|
if SUCCESS_REGEXP.match(output[:stdout])
|
||||||
{count: $1.to_i, passed: $1.to_i}
|
{count: Regexp.last_match(1).to_i, passed: Regexp.last_match(1).to_i}
|
||||||
else
|
else
|
||||||
count = COUNT_REGEXP.match(output[:stdout]).try(:captures).try(:first).try(:to_i) || 0
|
count = COUNT_REGEXP.match(output[:stdout]).try(:captures).try(:first).try(:to_i) || 0
|
||||||
failed = FAILURES_REGEXP.match(output[:stdout]).try(:captures).try(:first).try(:to_i) || 0
|
failed = FAILURES_REGEXP.match(output[:stdout]).try(:captures).try(:first).try(:to_i) || 0
|
||||||
|
@ -10,7 +10,7 @@ class Whistleblower
|
|||||||
|
|
||||||
def generate_hint(stderr)
|
def generate_hint(stderr)
|
||||||
if hint = find_hint(stderr)
|
if hint = find_hint(stderr)
|
||||||
hint.message.gsub(PLACEHOLDER_REGEXP) { @matches[$1.to_i] }
|
hint.message.gsub(PLACEHOLDER_REGEXP) { @matches[Regexp.last_match(1).to_i] }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user