mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Report failed expectation line
In output listing the failures, the comment line now shows the failed expectation line. Previously this showed the example's source line.
This commit is contained in:
parent
66e3155a0d
commit
07aa968d68
2 changed files with 13 additions and 0 deletions
|
@ -45,5 +45,13 @@ module Spectator::Formatting::Components
|
|||
io << padding << key.colorize(:red) << ": ".colorize(:red) << value
|
||||
end
|
||||
end
|
||||
|
||||
# Produces the location line.
|
||||
# This is where the result was determined.
|
||||
private def location_line(io)
|
||||
return unless location = @expectation.location? || @example.location?
|
||||
|
||||
line(io) { io << Comment.colorize(location) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue