mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add expectation values to failure
This commit is contained in:
parent
50929c6666
commit
f1873238cd
1 changed files with 10 additions and 1 deletions
|
@ -20,9 +20,18 @@ module Spectator::Formatting
|
||||||
super
|
super
|
||||||
@result.expectations.each_unsatisfied do |expectation|
|
@result.expectations.each_unsatisfied do |expectation|
|
||||||
xml.element("failure", message: expectation.actual_message) do
|
xml.element("failure", message: expectation.actual_message) do
|
||||||
# TODO: Add values as text to block.
|
expectation_values(expectation.values, xml)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Adds the expectation values to the failure block.
|
||||||
|
private def expectation_values(labeled_values, xml)
|
||||||
|
labeled_values.each do |entry|
|
||||||
|
label = entry.label
|
||||||
|
value = entry.value
|
||||||
|
xml.text("#{label}: #{value}\n")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue