Use standard status text

This commit is contained in:
Michael Miller 2019-03-23 16:34:54 -06:00
parent ff20fbe232
commit 50929c6666
4 changed files with 19 additions and 1 deletions

View file

@ -10,6 +10,11 @@ module Spectator::Formatting
def initialize(@result : FailedResult)
end
# Status string specific to the result type.
private def status
"FAIL"
end
# Adds the failed expectations to the XML block.
private def content(xml)
super

View file

@ -12,7 +12,7 @@ module Spectator::Formatting
private def attributes
{
name: result.example,
status: result,
status: status,
classname: classname,
}
end
@ -20,6 +20,9 @@ module Spectator::Formatting
# Result to pull values from.
private abstract def result
# Status string specific to the result type.
private abstract def status : String
# Adds additional content to the "testcase" XML block.
# Override this to add more content.
private def content(xml)

View file

@ -10,6 +10,11 @@ module Spectator::Formatting
def initialize(@result : PendingResult)
end
# Status string specific to the result type.
private def status
"TODO"
end
# Adds the skipped tag to the XML block.
private def content(xml)
super

View file

@ -7,5 +7,10 @@ module Spectator::Formatting
# Creates the JUnit test case.
def initialize(@result : SuccessfulResult)
end
# Status string specific to the result type.
private def status
"PASS"
end
end
end