我刚刚进入自动测试,我有以下问题。
如何获得自动测试以打印错误堆栈跟踪。如果我运行“rake spec”,我会得到输出
4) Transaction should get date with poor form
Failure/Error: transaction = Transaction.build_from_email(@email)
NoMethodError:
private method `gsub' called for 112:Fixnum
# ./app/models/transaction.rb:46:in `build_from_email'
# ./spec/models/transaction_spec.rb:104
但我通过自动测试得到以下信息
4) Transaction should get date with poor form
Failure/Error: transaction = Transaction.build_from_email(@email)
NoMethodError:
private method `gsub' called for 112:Fixnum
会更容易找到错误所在。
谢谢一堆