mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Insert example failed exception
This commit is contained in:
parent
2992a18992
commit
686304f31d
3 changed files with 9 additions and 1 deletions
5
src/spectator/example_failed.cr
Normal file
5
src/spectator/example_failed.cr
Normal file
|
@ -0,0 +1,5 @@
|
|||
module Spectator
|
||||
# Exception that indicates an example failed and should abort.
|
||||
class ExampleFailed < Exception
|
||||
end
|
||||
end
|
|
@ -1,6 +1,8 @@
|
|||
require "./example_failed"
|
||||
|
||||
module Spectator
|
||||
# Exception that indicates a required expectation was not met in an example.
|
||||
class ExpectationFailed < Exception
|
||||
class ExpectationFailed < ExampleFailed
|
||||
# Outcome of the expectation.
|
||||
# Additional information can be retrieved through this.
|
||||
getter result : Expectations::Expectation::Result
|
||||
|
|
|
@ -23,6 +23,7 @@ require "./example_group"
|
|||
require "./nested_example_group"
|
||||
require "./root_example_group"
|
||||
|
||||
require "./example_failed"
|
||||
require "./expectation_failed"
|
||||
require "./test_results"
|
||||
require "./runner"
|
||||
|
|
Loading…
Reference in a new issue