Skip to content

Commit 3ce6ffb

Browse files
committed
RfCs: Execute all user-defined tests
In exercises about unit testing, this change will support commenters to get more details about failures of the submission.
1 parent b373149 commit 3ce6ffb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/controllers/request_for_comments_controller.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ def create
143143
# As the same runner is used for the score and test run, no parallelization is possible
144144
# A run is triggered from the frontend and does not need to be handled here.
145145
@request_for_comment.submission.calculate_score(current_user)
146+
@request_for_comment.submission.files.select(&:user_defined_test?).each do |file|
147+
@request_for_comment.submission.test(file, current_user)
148+
end
146149
rescue Runner::Error::RunnerInUse => e
147150
Rails.logger.debug { "Scoring a submission failed because the runner was already in use: #{e.message}" }
148151
format.json { render json: {error: t('exercises.editor.runner_in_use'), status: :runner_in_use}, status: :conflict }

0 commit comments

Comments
 (0)