带有完整堆栈跟踪的单元测试 [英] Unit Tests w/ Full Stack Traces
本文介绍了带有完整堆栈跟踪的单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这似乎是一个愚蠢的问题,但我在任何地方都找不到答案.我将 Rails 3.1 与 Test::Unit 一起使用.
This seems like a stupid question, but I could not find the answer anywhere. I am using Rails 3.1 with Test::Unit.
当测试失败时,我只能看到堆栈的顶部,例如:
When a test fails I only see the top of the stack, e.g.:
ERROR creating a message sends emails (1.35s)
NoMethodError: undefined method `project' for nil:NilClass
/Users/ghempton/.rvm/gems/ruby-1.9.2-p180@gt/gems/activesupport-3.1.3/lib/active_support/whiny_nil.rb:48:in `method_missing'
如何查看完整的堆栈跟踪?
How do I see the full stack trace?
推荐答案
我最终通过更新格式化测试输出的 turn
gem 解决了这个问题.
I wound up fixing this by updating the turn
gem which formats the test output.
这篇关于带有完整堆栈跟踪的单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文