Ensure example is set to finished after running

This commit is contained in:
Michael Miller 2019-09-06 13:08:41 -06:00
parent 1c5b46b981
commit 0706a9986c

View file

@ -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.