How to avoid a long stacktrace in rspec

Is it easy to limit the stack trace to only files in the application? A long stacktrace is useless, and most errors are directly in the application.

+8
ruby ruby-on-rails rspec
source share
2 answers

Typically, stacktrace is automatically reduced if you do not specify the --backtrace option in the --backtrace file.

Maybe this question is useful for you. They try to achieve the opposite, but it shows where you can hook and undo it.

+6
source share

I don't think there is currently a way to further reduce stacktrace, but I am with you - it would be nice to add something like --backtrace 4 to .rspec, which would limit it to 4 lines

0
source share

All Articles