From e44505d4c18b0f101b9b95667960856222275c98 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 30 Jan 2021 21:00:01 -0700 Subject: [PATCH] Set nameless example to matcher description --- src/spectator/harness.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spectator/harness.cr b/src/spectator/harness.cr index aa09a81..784df86 100644 --- a/src/spectator/harness.cr +++ b/src/spectator/harness.cr @@ -66,6 +66,7 @@ module Spectator def report(expectation : Expectation) : Nil Log.debug { "Reporting expectation #{expectation}" } @expectations << expectation + Example.current.name = expectation.description unless Example.current.name? raise ExpectationFailed.new(expectation) if expectation.failed? end