rspec / rspec-core

RSpec runner and formatters
http://rspec.info
MIT License
1.23k stars 765 forks source link

FailureListFormatter: use exception message as reason, not spec name #2839

Closed paddor closed 3 years ago

paddor commented 3 years ago

For me, this improves the value of the 3rd field ("reason") when working with the Quickfix list in Vim.

Additionally, rspec --help specifies this behavior:

    -f, --format FORMATTER             Choose a formatter.
                                         [p]rogress (default - dots)
                                         [d]ocumentation (group and example names)
                                         [h]tml
                                         [j]son
                                         [f]ailures ("file:line:reason", suitable for editors integration)
JonRowe commented 3 years ago

Please rebase this off our default branch, which is main.

paddor commented 3 years ago

@JonRowe I've rebased off main (sorry, I forked ages ago).

@smortex I've improved the locations. It'll find the first relevant location in the exception's backtrace, if set, defaulting back to the example location.

paddor commented 3 years ago

Something went wrong with rebasing... I'm gonna reopen this in a new PR.