[v2] capture compilation errors
masukomi opened this issue · 1 comments
masukomi commented
as you can see in the attached screenshot, rspec is capturing and formatting compilation errors (and noting "no examples found" as a result) but they aren't passed to the example_failed
endpoint because it's not a failed example
We can get this in the message
method
RSpec::Core::Formatters.register self,
:example_failed,
:close,
:message
# ...
def message(notification)
notification.message
# has an error string
# with "Failure/Error: ..." and maybe "NameError" and a backtrace
# (see screenshot) so, yet another custom string to parse.
end
UNFORTUNATELY
this kinda breaks the whole "there's a number you can reference to run it again" and probably breaks failure display.
I think the formatter is going to need to subclass Failure
as Message
to handle the completely different data structure.
I think rtest
is going to have to subclass Failure
as Message
for a similar reason and....maybe also FailurePrinter
?
maybe the number is 0
?