Remove unused ExampleStatus enum

This commit is contained in:
Michael Miller 2019-02-17 23:09:23 -07:00
parent eaf1d19feb
commit b646b8bec5

View file

@ -1,59 +0,0 @@
module Spectator
# Various outcomes that an example can be in.
enum ExampleStatus
# The example was intentionally not run.
# This is different than `Pending`.
# This value means the example was not pending
# and was not run due to filtering or other means.
Skipped,
# The example finished successfully.
Successful,
# The example ran, but failed.
Failed,
# An error occurred while executing the example.
Errored,
# The example is marked as pending and was not run.
Pending,
# The example finished successfully,
# but something may be wrong with it.
Warning
# Indicates whether an example was skipped.
def skipped?
self == Skipped
end
# Indicates that an example was run and it was successful.
# NOTE: Examples with warnings count as successful.
def successful?
!failed? && !pending?
end
# Indicates that an example was run, but it failed.
# Errors count as failures.
def failed?
self == Failed || errored?
end
# Indicates whether an error was encountered while running the example.
def errored?
self == Errored
end
# Indicates that an example was marked as pending.
def pending?
self == Pending
end
# Indicates that the example finished successfully,
# but something may be wrong with it.
def warning?
self == Warning
end
end
end