2013-05-18 27 views
0

在黃瓜裏,當我的表步驟失敗時,我看到下面的錯誤加上堆棧跟蹤,但沒有給出有關表差異的實際信息。我如何能看到進展格式化黃瓜表的差異?

Tables were not identical (Cucumber::Ast::Table::Different)

我怎樣才能黃瓜給我看錶的差異?

回答

0

我發現下面的猴子補丁製作黃瓜1.1.9

創建支持文件,例如功能/支持/ 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