Fix missing example location in output

This commit is contained in:
Michael Miller 2021-07-17 16:27:38 -06:00
parent 6c6dff363b
commit e316dd8a11
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD

View file

@ -73,9 +73,8 @@ module Spectator::Formatting::Components
private def location_line(io)
location = if (result = @example.result).responds_to?(:location)
result.location
else
@example.location?
end
location ||= @example.location?
return unless location
line(io) { io << Comment.colorize(location) }