mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
15 lines
440 B
Crystal
15 lines
440 B
Crystal
require "./example_failed"
|
|
|
|
module Spectator
|
|
# Exception that indicates a required expectation was not met in an example.
|
|
class ExpectationFailed < ExampleFailed
|
|
# Expectation that failed.
|
|
getter expectation : Expectations::Expectation
|
|
|
|
# Creates the exception.
|
|
# The exception string is generated from the expecation message.
|
|
def initialize(@expectation)
|
|
super(@expectation.failure_message)
|
|
end
|
|
end
|
|
end
|