Capybara: exception trace in log
Asked Answered
B

2

26

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?

Bandage answered 11/4, 2012 at 14:32 Comment(0)
C
46

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

config.action_dispatch.show_exceptions = false

And change it to true.

Cesura answered 11/4, 2012 at 15:7 Comment(3)
Unfortunately this didn't work for me, but the solution of using mongrel reported here did: #4628428Dottie
config.action_dispatch.show_exceptions = true by default on both test and development env! It is not working for me.Hexa
This sounds like its for Rails >= 3. Anything for Rails 2?Guileful
E
0

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.

Erelia answered 25/12, 2018 at 18:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.