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,14 +40,11 @@ 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
end
end
# Creates a proc that runs the test code
# and captures the result.