class ParallelTests::Gherkin::RuntimeLogger
Public Class Methods
new(step_mother, path_or_io, options)
click to toggle source
# File lib/parallel_tests/gherkin/runtime_logger.rb, line 8 def initialize(step_mother, path_or_io, options) @io = prepare_io(path_or_io) @example_times = Hash.new(0) end
Public Instance Methods
after_feature(feature)
click to toggle source
# File lib/parallel_tests/gherkin/runtime_logger.rb, line 17 def after_feature(feature) @example_times[feature.file] += ParallelTests.now.to_f - @start_at end
after_features(*args)
click to toggle source
# File lib/parallel_tests/gherkin/runtime_logger.rb, line 21 def after_features(*args) lock_output do @io.puts @example_times.map { |file, time| "#{file}:#{time}" } end end
before_feature(_)
click to toggle source
# File lib/parallel_tests/gherkin/runtime_logger.rb, line 13 def before_feature(_) @start_at = ParallelTests.now.to_f end