Sławosz
Sławosz

Reputation: 11687

How to avoid a long stacktrace in rspec

is it easy way to limit stack trace only to files in application? Long stacktrace is messy and most errors are directly in app.

Upvotes: 11

Views: 1786

Answers (2)

rdaniels
rdaniels

Reputation: 979

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

Upvotes: 0

nathanvda
nathanvda

Reputation: 50057

Normally the stacktrace is shortened automatically, unless you specify the option --backtrace in .rspec file.

Maybe this question is helpful for you. They try to achieve the opposite, but it shows the point where you can hook in and overrule it.

Upvotes: 8

Related Questions