This is necessary for the changes in rspec/rspec-support#210. That adds an additional stack frame to the parent exception (for the lambda that wraps `raise`) and our truncation wasn’t working properly with it. Really, the old way just happened to work. This is much more robust.
This is necessary for niche situations where `aggregate_failures` is nested.
- The presence of backticks within that part was causing rendering problems on relish. - Different rubies have different output there so we already ignore that part when comparing the expected to actual output.
It is already listed on the aggregate failure backtrace, and would be redundant to list it on each sub-failure.
To get this to work properly, we have to compose the exception presenter options for pending and for MultipleExpectationsNotMetError.
We need to combine some of these cases (such as when we get a `MultipleExpectationsNotMetError` in a pending spec), and to do that we need to combine the options, so having the options listed in the same method is a stepping stone towards that.
- Simplifies the notification classes. - Provides something we can use to format multiple expectation failures packaged as a single exception for `aggregate_failures`.
This will make it easier to extract an `ExceptionFormatter`.
- Remove unnecessary `Array#last` call. - This version is threadsafe, whereas the prior version wasn’t. Consider what would happen if another thread added an example to the `examples` array while this was happening: it would have returned a different example than the one created here. We don’t actually do any multithreading when examples are defined, and have no plans to do so, but it’s always nice to make things more threadsafe.