Forum: RSpec Backtrace for passing specs via custom formatter

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
44cbd795ae9185fc634ab8bc7939b3e3?d=identicon&s=25 Andreas Wolff (Guest)
on 2008-11-23 02:35
(Received via mailing list)

I'm using example.implementation_backtrace in a custom formatter to
get the path of the file a passing spec belongs to. Following rspec on
github I saw that implementation_backtrace is now deprecated and
replaced by example.backtrace. Sadly it always returns nil for passed
specs. So I had a look at the source and found that backtrace only
gets assigned if line_number was set.

Can anybody tell me why this was changed to only work with line_number
set and if there is another way to get the file a spec belongs to.

Thanks for your help!

lg // andreas
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-11-24 16:56
(Received via mailing list)
On Fri, Nov 21, 2008 at 4:55 AM, Andreas Wolff
<> wrote:
> set and if there is another way to get the file a spec belongs to.
Hey Andreas,

I asked for that in the context of another refactoring in the interest
of efficiency. I though that it was only being used for --line.

I've just pushed code back up that removes this errant optimization so
you should be good - however, you should use #backtrace instead of


This topic is locked and can not be replied to.