Skip to content

Instantly share code, notes, and snippets.

@wellavelino
Created July 12, 2018 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wellavelino/7c5528d98c6026138613bf5269758f0f to your computer and use it in GitHub Desktop.
Save wellavelino/7c5528d98c6026138613bf5269758f0f to your computer and use it in GitHub Desktop.
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