Capybara: exception trace in log

2020-05-24 20:44发布

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

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

2条回答
ら.Afraid
2楼-- · 2020-05-24 21:19

The selected answer did not work for me. I'm using Cucumber + Capybara + Rails.

This related answer helped me get the culprit error in the test.log file after running the Cucumber scenario.

查看更多
Fickle 薄情
3楼-- · 2020-05-24 21:39

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

config.action_dispatch.show_exceptions = false

And change it to true.

查看更多
登录 后发表回答