Don't run after hooks if an error occurs

This commit is contained in:
Michael Miller 2018-12-07 23:01:02 -07:00
parent 4222603fea
commit 4e57f6adca

View file

@ -40,12 +40,9 @@ module Spectator
# Get the proc that will call around-each hooks and the example.
wrapper = wrap_run_example(result)
begin
run_before_hooks
wrapper.call
ensure
run_after_hooks
end
run_before_hooks
wrapper.call
run_after_hooks
end
end