I use rspec a lot. I thinks it’s a great testing framework.
In order to get shorter error output, rspec cleans backtraces from outside code. Here are all the patterns that are removed from the full backtrace :
1 2 3 4 5 6 7 8
Most of the time, that’s great. Sometimes though, we get messages that seem completly unrelated to the code. Even worse, we might get misleading messages, such as “method called with unexpected number of arguments” that does not refer to the code in the backtrace, but to some other library code …
I thought it would be nice if we could switch this cleaning off sometimes. Here is how I did this :
1 2 3 4 5 6 7 8 9 10 11
This way, it is still possible to call rspec as before to get the standard behaviour, but it is now possible to specify the FULLBACKTRACES variable to get full backtraces.