From 48fb293ba08683374ea60966833cf65211b28e4c Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 29 May 2021 22:59:56 -0600 Subject: [PATCH] Define notification type for messages --- src/spectator/formatting/formatter.cr | 1 + src/spectator/formatting/notifications.cr | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/spectator/formatting/formatter.cr b/src/spectator/formatting/formatter.cr index a80ea66..7c46e54 100644 --- a/src/spectator/formatting/formatter.cr +++ b/src/spectator/formatting/formatter.cr @@ -78,6 +78,7 @@ module Spectator::Formatting # Called whenever the example or framework produces a message. # This is typically used for logging. + # The *notification* will be a `MessageNotification` type of object. def message(_notification) end diff --git a/src/spectator/formatting/notifications.cr b/src/spectator/formatting/notifications.cr index 362f710..e789514 100644 --- a/src/spectator/formatting/notifications.cr +++ b/src/spectator/formatting/notifications.cr @@ -17,4 +17,7 @@ module Spectator::Formatting # Structure containing summarized information from the outcome of the test suite. record SummaryNotification, report : Report + + # Structure containing a debug or log message from the test suite. + record MessageNotification, message : String end