Description:
Updated `be_true` and `be_false` to `be true` and `be false` respectively
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r205:825a5364bee6 - - 1 file changed: 4 inserted, 4 deleted
@@ -193,49 +193,49 | |||
|
193 | 193 | it "should run test request and produce output file" do |
|
194 | 194 | problem = stub(Problem, |
|
195 | 195 | :id => 1, :name => 'test_normal') |
|
196 | 196 | grader_should(:grade => 'test1_correct.c', |
|
197 | 197 | :on => problem, |
|
198 | 198 | :with => 'in1.txt', |
|
199 | 199 | :and_report => { |
|
200 | 200 | :graded_at= => nil, |
|
201 | 201 | :compiler_message= => '', |
|
202 | 202 | :grader_comment= => '', |
|
203 | 203 | :running_stat= => /0.0\d* sec./, |
|
204 | 204 | :output_file_name= => lambda { |fname| |
|
205 |
- File.exists?(fname).should be |
|
|
205 | + File.exists?(fname).should be true | |
|
206 | 206 | }, |
|
207 | 207 | :running_time= => nil, |
|
208 | 208 | :exit_status= => nil, |
|
209 | 209 | :memory_usage= => nil, |
|
210 | 210 | :save => nil}) |
|
211 | 211 | end |
|
212 | 212 | |
|
213 | 213 | it "should clean up problem directory after running test request" do |
|
214 | 214 | problem = stub(Problem, |
|
215 | 215 | :id => 1, :name => 'test_normal') |
|
216 | 216 | grader_should(:grade => 'test1_correct.c', |
|
217 | 217 | :on => problem, |
|
218 | 218 | :with => 'in1.txt', |
|
219 | 219 | :and_report => { |
|
220 | 220 | :graded_at= => nil, |
|
221 | 221 | :compiler_message= => '', |
|
222 | 222 | :grader_comment= => '', |
|
223 | 223 | :running_stat= => nil, |
|
224 | 224 | :output_file_name= => nil, |
|
225 | 225 | :running_time= => nil, |
|
226 | 226 | :exit_status= => nil, |
|
227 | 227 | :memory_usage= => nil, |
|
228 | 228 | :save => nil}) |
|
229 |
- File.exists?(@config.user_result_dir + "/test_request/test_normal/test_cases/1/input-1.txt").should be |
|
|
229 | + File.exists?(@config.user_result_dir + "/test_request/test_normal/test_cases/1/input-1.txt").should be false | |
|
230 | 230 | end |
|
231 | 231 | |
|
232 | 232 | it "should compile test request with error and report compilation error" do |
|
233 | 233 | problem = stub(Problem, |
|
234 | 234 | :id => 1, :name => 'test_normal') |
|
235 | 235 | grader_should(:grade => 'test1_compile_error.c', |
|
236 | 236 | :on => problem, |
|
237 | 237 | :with => 'in1.txt', |
|
238 | 238 | :and_report => { |
|
239 | 239 | :graded_at= => nil, |
|
240 | 240 | :compiler_message= => /.+/, |
|
241 | 241 | :grader_comment= => /[Cc]ompil.*error/, |
@@ -246,45 +246,45 | |||
|
246 | 246 | it "should report exit status" do |
|
247 | 247 | problem = stub(Problem, |
|
248 | 248 | :id => 1, :name => 'test_normal') |
|
249 | 249 | grader_should(:grade => 'add_nonzero_exit_status.c', |
|
250 | 250 | :on => problem, |
|
251 | 251 | :with => 'in1.txt', |
|
252 | 252 | :and_report => { |
|
253 | 253 | :graded_at= => nil, |
|
254 | 254 | :compiler_message= => '', |
|
255 | 255 | :grader_comment= => '', |
|
256 | 256 | :running_stat= => /[Ee]xit.*status.*10.*0\.0\d* sec/m, |
|
257 | 257 | :output_file_name= => lambda { |fname| |
|
258 |
- File.exists?(fname).should be |
|
|
258 | + File.exists?(fname).should be true | |
|
259 | 259 | }, |
|
260 | 260 | :running_time= => nil, |
|
261 | 261 | :exit_status= => /10/, |
|
262 | 262 | :memory_usage= => nil, |
|
263 | 263 | :save => nil}) |
|
264 | 264 | end |
|
265 | 265 | |
|
266 | 266 | it "should produce running statistics for normal submission" do |
|
267 | 267 | problem = stub(Problem, |
|
268 | 268 | :id => 1, :name => 'test_normal') |
|
269 | 269 | grader_should(:grade => 'test_run_stat.c', |
|
270 | 270 | :on => problem, |
|
271 | 271 | :with => 'in1.txt', |
|
272 | 272 | :and_report => { |
|
273 | 273 | :graded_at= => nil, |
|
274 | 274 | :compiler_message= => '', |
|
275 | 275 | :grader_comment= => '', |
|
276 | 276 | :running_stat= => nil, |
|
277 | 277 | :output_file_name= => lambda { |fname| |
|
278 |
- File.exists?(fname).should be |
|
|
278 | + File.exists?(fname).should be true | |
|
279 | 279 | }, |
|
280 | 280 | :running_time= => lambda { |t| |
|
281 | 281 | (t>=0.14) and (t<=0.16) |
|
282 | 282 | }, |
|
283 | 283 | :exit_status= => nil, |
|
284 | 284 | :memory_usage= => lambda { |s| |
|
285 | 285 | (s>=500) and (s<=1000) |
|
286 | 286 | }, |
|
287 | 287 | :save => nil}) |
|
288 | 288 | end |
|
289 | 289 | |
|
290 | 290 | protected |
You need to be logged in to leave comments.
Login now