mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Shorten ExpectationFailedError to ExpectationFailed
This commit is contained in:
parent
a1871ca62e
commit
b5cdda4af3
4 changed files with 7 additions and 7 deletions
|
@ -13,13 +13,13 @@ module Spectator
|
|||
|
||||
def to(matcher : Matchers::Matcher)
|
||||
unless matcher.match?(self)
|
||||
raise ExpectationFailedError.new
|
||||
raise ExpectationFailed.new
|
||||
end
|
||||
end
|
||||
|
||||
def to_not(matcher : Matchers::Matcher)
|
||||
if matcher.match?(self)
|
||||
raise ExpectationFailedError.new
|
||||
raise ExpectationFailed.new
|
||||
end
|
||||
end
|
||||
|
||||
|
|
4
src/spectator/expectation_failed.cr
Normal file
4
src/spectator/expectation_failed.cr
Normal file
|
@ -0,0 +1,4 @@
|
|||
module Spectator
|
||||
class ExpectationFailed < Exception
|
||||
end
|
||||
end
|
|
@ -1,4 +0,0 @@
|
|||
module Spectator
|
||||
class ExpectationFailedError < Exception
|
||||
end
|
||||
end
|
|
@ -37,7 +37,7 @@ module Spectator
|
|||
case (error = result.error)
|
||||
when Nil
|
||||
SuccessfulExampleResult.new(self, result.elapsed)
|
||||
when ExpectationFailedError
|
||||
when ExpectationFailed
|
||||
FailedExampleResult.new(self, result.elapsed, error)
|
||||
else
|
||||
ErroredExampleResult.new(self, result.elapsed, error)
|
||||
|
|
Loading…
Reference in a new issue