水豚:日志中的异常跟踪 [英] Capybara: exception trace in log

查看:90
本文介绍了水豚:日志中的异常跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在水豚中运行集成测试时,有应用引发异常(500错误;在浏览器中呈现), test.log 文件中没有堆栈跟踪。这是我在那看到的唯一一行:

While running integration tests in capybara, having app raise an exception (500 error; is rendered in browser) there's no stack trace in test.log file. Here's the only line I see there:

Completed 500 Internal Server Error in 25ms

我错过了什么吗?在集成测试期间,如何使堆栈跟踪出现在 test.log 中?

Am I missing something? How do I make stacktraces appear in test.log during integration testing?

推荐答案

去检查您的 config / environments / test.rb 查找以下行:

Go examine your config/environments/test.rb to find the line:

config.action_dispatch.show_exceptions = false

并将其更改为

这篇关于水豚:日志中的异常跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆