From e316dd8a117b5a9bd2253eb8745d57a9d08a6bdc Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 17 Jul 2021 16:27:38 -0600 Subject: [PATCH] Fix missing example location in output --- src/spectator/formatting/components/result_block.cr | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/spectator/formatting/components/result_block.cr b/src/spectator/formatting/components/result_block.cr index 6d89f3f..51f013d 100644 --- a/src/spectator/formatting/components/result_block.cr +++ b/src/spectator/formatting/components/result_block.cr @@ -73,9 +73,8 @@ module Spectator::Formatting::Components private def location_line(io) location = if (result = @example.result).responds_to?(:location) result.location - else - @example.location? end + location ||= @example.location? return unless location line(io) { io << Comment.colorize(location) }