diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ce5e20..74b09f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Changed +- Forward example procsy `to_s` to underlying example. [#70](https://gitlab.com/arctic-fox/spectator/-/issues/70) + ## [0.10.5] - 2022-01-27 ### Fixed - Fixed usage of `sample` with single block argument. [#41](https://github.com/icy-arctic-fox/spectator/issues/41#issuecomment-1022525702) diff --git a/src/spectator/example.cr b/src/spectator/example.cr index 93135a8..8f99e93 100644 --- a/src/spectator/example.cr +++ b/src/spectator/example.cr @@ -283,6 +283,12 @@ module Spectator # Allow instance to behave like an example. forward_missing_to @example + + # Constructs the full name or description of the example. + # This prepends names of groups this example is part of. + def to_s(io) : Nil + @example.to_s(io) + end end end end