diff --git a/src/spectator/example.cr b/src/spectator/example.cr index 0e9bc9a..9aef402 100644 --- a/src/spectator/example.cr +++ b/src/spectator/example.cr @@ -10,5 +10,11 @@ module Spectator end private getter locals + + def to_s(io) + @group.to_s(io) + io << ' ' + io << description + end end end diff --git a/src/spectator/example_group.cr b/src/spectator/example_group.cr index 6797508..8f62de3 100644 --- a/src/spectator/example_group.cr +++ b/src/spectator/example_group.cr @@ -85,5 +85,13 @@ module Spectator end wrapper end + + def to_s(io) + if (parent = @parent) + parent.to_s(io) + io << ' ' + end + io << what + end end end