Test Adapters: Always use the last output for score runs

* This prevents learners from cheating by printing the required status line themselves
This commit is contained in:
Sebastian Serth
2021-11-02 15:52:49 +01:00
parent d7e515f1c6
commit 3d3478d859
8 changed files with 33 additions and 33 deletions

View File

@ -8,7 +8,7 @@ class RspecAdapter < TestingFrameworkAdapter
end
def parse_output(output)
captures = REGEXP.match(output[:stdout]).captures.map(&:to_i)
captures = output[:stdout].scan(REGEXP).try(:last).map(&:to_i)
count = captures.first
failed = captures.second
{count: count, failed: failed}