mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Don't run after hooks if an error occurs
This commit is contained in:
parent
4222603fea
commit
4e57f6adca
1 changed files with 4 additions and 7 deletions
|
@ -39,13 +39,10 @@ module Spectator
|
|||
ResultCapture.new.tap do |result|
|
||||
# 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
|
||||
|
||||
|
|
Loading…
Reference in a new issue