mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Colorize matcher values green and red
This commit is contained in:
parent
df71e56b3e
commit
6307024af3
1 changed files with 6 additions and 2 deletions
|
@ -65,8 +65,12 @@ module Spectator::Formatting
|
|||
# Produces the values list for an expectation
|
||||
private def matcher_values(indent, expectation)
|
||||
MatchDataValues.new(expectation.values).each do |pair|
|
||||
# TODO: Not all expectations will be failures (color green and red).
|
||||
indent.line(Color.failure(pair))
|
||||
colored_pair = if expectation.satisfied?
|
||||
Color.success(pair)
|
||||
else
|
||||
Color.failure(pair)
|
||||
end
|
||||
indent.line(colored_pair)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue