Examiner
Grade a student's exercise solution.
Assumptions:
- The exercise uses minitest to be checkied
- There is a
Rakefilein the exercise folder
Installation
Add this line to your application's Gemfile:
gem 'examiner'
And then execute:
$ bundle
Usage
You can quickly grade a student's exercise solution with the following code.
exercise_directory = "/path/to/student_exercise_with_rakefile"
runner = Examiner::RakeRunner.new
runner.run exercise_directory
if runner.success?
puts "Results: #{runner.tests - runner.failures}/#{runner.tests}"
end
# You can display stdout and stderr
puts runner.stdout_lines.join
puts runner.stderr_lines.join