Ensure harness is reset on error

This commit is contained in:
Michael Miller 2018-10-19 18:52:00 -06:00
parent c48467f783
commit 9cf82928b7

View file

@ -26,9 +26,9 @@ module Spectator::Internals
# The result returned from `Example#run` will be returned.
def self.run(example : Example) : Result
@@current = new(example)
result = example.run
example.run
ensure
@@current = nil
result
end
# Retrieves the current running example.