From 5dfc60d4cd894938e024645de6376719cf3f2e52 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Mon, 26 Apr 2021 16:53:04 -0600 Subject: [PATCH] Fix nil reference error when example name is unavailable --- src/spectator/formatting/document_formatter.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spectator/formatting/document_formatter.cr b/src/spectator/formatting/document_formatter.cr index 16efdf8..331fb13 100644 --- a/src/spectator/formatting/document_formatter.cr +++ b/src/spectator/formatting/document_formatter.cr @@ -29,7 +29,7 @@ module Spectator::Formatting # Produces a single character output based on a result. def end_example(result) @previous_hierarchy.size.times { @io.print INDENT } - @io.puts result.accept(Color) { result.example.name } + @io.puts result.accept(Color) { result.example } end # Produces a list of groups making up the hierarchy for an example.