在黄瓜中,当我的表步骤失败时,我看到以下错误加上堆栈跟踪,但没有给出关于表差异的实际信息。
Tables were not identical (Cucumber::Ast::Table::Different)
我怎样才能让黄瓜向我展示餐桌差异?
答案 0 :(得分:0)
我发现以下猴子贴片适用于黄瓜1.1.9
创建支持文件,例如features / support / progress_formatter_extensions.rb
require 'cucumber/formatter/progress'
module Cucumber
module Formatter
class Progress
def exception(exception, status)
@exception_raised = true
if exception.kind_of?(Cucumber::Ast::Table::Different)
@io.puts(exception.table)
@io.flush
end
end
end
end
end