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
|
# Produces the values list for an expectation
|
||||||
private def matcher_values(indent, expectation)
|
private def matcher_values(indent, expectation)
|
||||||
MatchDataValues.new(expectation.values).each do |pair|
|
MatchDataValues.new(expectation.values).each do |pair|
|
||||||
# TODO: Not all expectations will be failures (color green and red).
|
colored_pair = if expectation.satisfied?
|
||||||
indent.line(Color.failure(pair))
|
Color.success(pair)
|
||||||
|
else
|
||||||
|
Color.failure(pair)
|
||||||
|
end
|
||||||
|
indent.line(colored_pair)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue