Created
July 12, 2018 18:14
-
-
Save wellavelino/7c5528d98c6026138613bf5269758f0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
at_exit do | |
result=$Erros.group_by(&:classe).map do |token, with_same_token| | |
[token, with_same_token.map(&:mensagem), with_same_token.size] | |
end | |
puts "Mapa de Erros" | |
puts "=============================" | |
for err in result do | |
puts "Erro de " + err.first.to_s + " > " + err.last.to_s | |
end | |
end | |
if scenario.failed? | |
exceptionClass = scenario.exception.class.to_s | |
exceptionMessage = scenario.exception.message.to_s.downcase | |
_erro = Struct.new(:classe, :mensagem) | |
$Erros << _erro.new(exceptionClass, exceptionMessage) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment