From a5ed5d0fb15ec6c7216aac3dae35b0084981551f Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 12 Jun 2021 10:33:28 -0600 Subject: [PATCH] Pass exception failure message to error --- src/spectator/harness.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spectator/harness.cr b/src/spectator/harness.cr index 08ccb2e..7a4df88 100644 --- a/src/spectator/harness.cr +++ b/src/spectator/harness.cr @@ -81,7 +81,7 @@ module Spectator # TODO: Move this out of harness, maybe to `Example`. Example.current.name = expectation.description unless Example.current.name? - raise ExpectationFailed.new(expectation) if expectation.failed? + raise ExpectationFailed.new(expectation, expectation.failure_message) if expectation.failed? end # Stores a block of code to be executed later.