
Check correctness of student solution rmd.
check_correctness.RdThis will run unit tests on the students' rmd file.
Arguments
- e_stud
The environment containing the output objects from running the studnent Rmd file.
- e_soln
The environment containing the objects from the solution template. It will probably contain objects with the suffix "_soln". These will be tested against the versions generated by the student.
- test_fname
The R script containing the test chunks.
Value
A data frame with one row, and the number of columns equal to the number of tests run plus the number of scalars to keep.
Details
Prior to calling this, populate_soln_env should
already have been called on the solution template, and the student
file should already have been knitted in order to generate the students'
objects. Of course, one could generate the test script independent of
populate_soln_env, but the solution environment that contains
objects with a "_soln" suffix is also needed.
The student environment, solution environment, test file and the list of tests and expectations are the inputs to this function.