Permalink
Browse files

[Specs] Refine output

  • Loading branch information...
1 parent 98fc477 commit 606ec35022619ebc81eec11eec0f7cb096d2c596 @fabiopelosin fabiopelosin committed May 9, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 spec/spec_helper/bacon.rb
@@ -55,7 +55,14 @@ def handle_requirement(description, disabled = false)
elsif disabled
puts Bacon.color(:yellow, "#{spaces}- #{description} [DISABLED]")
else
- time_color = elapsed_time > 200 ? :yellow : :none
+ time_color = case elapsed_time
+ when 0..200
+ :none
+ when 200..500
+ :yellow
+ else
+ :red
+ end
puts Bacon.color(:green, "#{spaces}") + "#{description} " + Bacon.color(time_color, "(#{elapsed_time} ms)")
end
end

0 comments on commit 606ec35

Please sign in to comment.