mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Use standard status text
This commit is contained in:
parent
ff20fbe232
commit
50929c6666
4 changed files with 19 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue