Description:
updated runner_spec git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@418 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r77:b0f4f829e914 - - 1 file changed: 1 inserted, 1 deleted

@@ -19,25 +19,25
19 19 end
20 20
21 21 it "should just return nil when there is no submission" do
22 22 Task.should_receive(:get_inqueue_and_change_status).and_return(nil)
23 23 @runner.grade_oldest_task.should be_nil
24 24 end
25 25
26 26 it "should grade oldest task in queue" do
27 27 submission = create_normal_submission_mock_from_file("test1_correct.c")
28 28
29 29 submission.should_receive(:graded_at=)
30 30 submission.should_receive(:points=).with(135)
31 - submission.should_receive(:grader_comment=).with(/^PASSED/)
31 + submission.should_receive(:grader_comment=).with("[PP][PPPPP][PPP]")
32 32 submission.should_receive(:compiler_message=).with('')
33 33 submission.should_receive(:save)
34 34
35 35 # mock task
36 36 task = stub(Task,:id => 1, :submission_id => submission.id)
37 37 Task.should_receive(:get_inqueue_and_change_status).and_return(task)
38 38 task.should_receive(:status_complete!)
39 39
40 40 # mock Submission
41 41 Submission.should_receive(:find).
42 42 with(task.submission_id).
43 43 and_return(submission)
You need to be logged in to leave comments. Login now