You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

duration_extractor.rb 551 B

2 years ago
1234567891011121314151617181920212223242526272829303132
  1. # frozen_string_literal: true
  2. module Cucumber
  3. module Formatter
  4. class DurationExtractor
  5. attr_reader :result_duration
  6. def initialize(result)
  7. @result_duration = 0
  8. result.describe_to(self)
  9. end
  10. def passed(*) end
  11. def failed(*) end
  12. def undefined(*) end
  13. def skipped(*) end
  14. def pending(*) end
  15. def exception(*) end
  16. def duration(duration, *)
  17. duration.tap { |dur| @result_duration = dur.nanoseconds / 10**9.0 }
  18. end
  19. def attach(*) end
  20. end
  21. end
  22. end

No Description

Contributors (1)