mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
ExpectationFailed exception takes a result
This commit is contained in:
parent
73a0d51c1b
commit
e14babc014
1 changed files with 10 additions and 0 deletions
|
@ -1,4 +1,14 @@
|
|||
module Spectator
|
||||
# Exception that indicates a required expectation was not met in an example.
|
||||
class ExpectationFailed < Exception
|
||||
# Outcome of the expectation.
|
||||
# Additional information can be retrieved through this.
|
||||
getter result : Expectations::Expectation::Result
|
||||
|
||||
# Creates the exception.
|
||||
# The exception string is generated from the expecation message.
|
||||
def initialize(@result)
|
||||
super(@result.actual_message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue