Sha256: a8d533bd45949f4ab416ce93fdc3f6bf7be62a1507676a68fdb6c3518f4104e5
Contents?: true
Size: 791 Bytes
Versions: 44
Compression:
Stored size: 791 Bytes
Contents
module Hydra #:nodoc: module Listener #:nodoc: # Output a textual report at the end of testing class ReportGenerator < Hydra::Listener::Abstract # Initialize a new report def testing_begin(files) @report = { } end # Log the start time of a file 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 def file_end(file, output) @report[file]['end'] = Time.now.to_f @report[file]['duration'] = @report[file]['end'] - @report[file]['start'] end # output the report def testing_end YAML.dump(@report, @output) @output.close end end end end
Version data entries
44 entries across 44 versions & 6 rubygems