diff --git a/src/spectator/expectation.cr b/src/spectator/expectation.cr index 9c9b4b4..51a74c3 100644 --- a/src/spectator/expectation.cr +++ b/src/spectator/expectation.cr @@ -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 diff --git a/src/spectator/expectation_failed.cr b/src/spectator/expectation_failed.cr new file mode 100644 index 0000000..5f15757 --- /dev/null +++ b/src/spectator/expectation_failed.cr @@ -0,0 +1,4 @@ +module Spectator + class ExpectationFailed < Exception + end +end diff --git a/src/spectator/expectation_failed_error.cr b/src/spectator/expectation_failed_error.cr deleted file mode 100644 index 71a8e13..0000000 --- a/src/spectator/expectation_failed_error.cr +++ /dev/null @@ -1,4 +0,0 @@ -module Spectator - class ExpectationFailedError < Exception - end -end diff --git a/src/spectator/runnable_example.cr b/src/spectator/runnable_example.cr index 4b838e6..9db50dd 100644 --- a/src/spectator/runnable_example.cr +++ b/src/spectator/runnable_example.cr @@ -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)