diff --git a/src/spectator/example.cr b/src/spectator/example.cr index d8185ef..934931a 100644 --- a/src/spectator/example.cr +++ b/src/spectator/example.cr @@ -22,8 +22,9 @@ module Spectator # An exception is raised if an attempt is made to run it more than once. def run : Result raise "Attempted to run example more than once (#{self})" if finished? - @finished = true run_impl + ensure + @finished = true end # Implementation-specific for running the example code.