Commit ff745f82 authored by Fabio Pelosin's avatar Fabio Pelosin

[SpecHelper] Fine tune bacon helper.

parent 1a883aba
......@@ -81,16 +81,20 @@ module Bacon
end
def handle_requirement(description, disabled = false)
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"
if @first_error
print Bacon.color(nil, '_')
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
......
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