Output a textual report at the end of testing
Log the start time of a file
# File lib/hydra/listener/report_generator.rb, line 11 def file_begin(file) @report[file] ||= { } @report[file]['start'] = Time.now.to_f end
Log the end time of a file and compute the file's testing duration
# File lib/hydra/listener/report_generator.rb, line 18 def file_end(file, output) @report[file]['end'] = Time.now.to_f @report[file]['duration'] = @report[file]['end'] - @report[file]['start'] @report[file]['all_tests_passed_last_run'] = (output == '.') end
Initialize a new report
# File lib/hydra/listener/report_generator.rb, line 6 def testing_begin(files) @report = { } end
output the report
# File lib/hydra/listener/report_generator.rb, line 25 def testing_end YAML.dump(@report, @output) @output.close end