# File lib/rspec/core/formatters/helpers.rb, line 9 9: def format_duration(duration) 10: if duration > 60 11: minutes = duration.to_i / 60 12: seconds = duration - minutes * 60 13: 14: "#{pluralize(minutes, 'minute')} #{format_seconds(seconds)} seconds" 15: else 16: "#{format_seconds(duration)} seconds" 17: end 18: end
# File lib/rspec/core/formatters/helpers.rb, line 20 20: def format_seconds(float) 21: precision ||= (float < 1) ? SUB_SECOND_PRECISION : DEFAULT_PRECISION 22: formatted = sprintf("%.#{precision}f", float) 23: strip_trailing_zeroes(formatted) 24: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.