module OnlyofficeTcmHelper::TimeHelper
it is helper for work with time class
Public Instance Methods
example_time_in_seconds(example)
click to toggle source
Example time in seconds @param [Object] example with data @return [String] time in seconds
# File lib/onlyoffice_tcm_helper/helpers/time_helper.rb, line 10 def example_time_in_seconds(example) execution_time = (Time.now - example.metadata[:execution_result].started_at).to_i execution_time = 1 if execution_time.zero? # Testrail cannot receive 0 as elapsed time "#{execution_time}s" end