etorreborre/specs2 — Issue #40: Example Failure Line Number
Author: djspiewak
Created: 2011-10-20 16:20:50+00:00
State: open

Back in Specs, when an example failed, the output was something of the form " (File.scala:123)", where "123" was the location of the *assertion* that failed. Unfortunately, Specs2 has taken a slight step backwards in that department: the line number is now the location of the *example* that failed. If you have an example with a large number of assertions (which I do!), it can be nearly impossible to figure out exactly which assertion is failing, just from this output. Usually, it requires some more trial-and-error fiddling with the assertions to locate the exact failure point, and that just seems unnecessary.

Could we get the line number to point at the assertion failure, rather than the example failure? (at least for mutable specifications)