class RSpecSay
Public Instance Methods
dump_summary(summary)
click to toggle source
# File lib/rspec_say/say_formatter.rb, line 7 def dump_summary(summary) output.puts summary.fully_formatted phrase = "Tests finished in #{format_time(summary.duration)}, " \ "#{summary.examples.count} examples, " \ "#{summary.failed_examples.count} failed, "\ "#{summary.pending_examples.count} pending" `say #{phrase}` end
Private Instance Methods
format_time(duration)
click to toggle source
@param [Float] @return [String]
# File lib/rspec_say/say_formatter.rb, line 21 def format_time(duration) if duration > 60 return "#{(duration / 60.0).round(3)} minutes" else return "#{duration.round(3)} seconds" end end