Commit ff745f82 authored by Fabio Pelosin's avatar Fabio Pelosin

[SpecHelper] Fine tune bacon helper.

parent 1a883aba
...@@ -81,16 +81,20 @@ module Bacon ...@@ -81,16 +81,20 @@ module Bacon
end end
def handle_requirement(description, disabled = false) def handle_requirement(description, disabled = false)
error = yield if @first_error
if !error.empty? print Bacon.color(nil, '_')
m = error[0..0]
c = (m == "E" ? :red : :yellow) unless @first_error
print Bacon.color(c, m)
@first_error = true
elsif disabled
print "D"
else else
print Bacon.color(nil, '.') error = yield
if !error.empty?
m = error[0..0]
c = (m == "E" ? :red : :yellow) unless @first_error
print Bacon.color(c, m)
@first_error = true
elsif disabled
print "D"
else
print Bacon.color(nil, '.')
end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment