mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Raise error instead of failing test
If an error occurs in any hooks, raise it instead of failing the test.
This commit is contained in:
parent
22f32eb03e
commit
aeebbaa5b6
1 changed files with 2 additions and 3 deletions
|
@ -29,9 +29,8 @@ module Spectator
|
|||
private def run_after_hooks(result)
|
||||
group.run_after_hooks
|
||||
rescue ex
|
||||
# Store the error from the hooks
|
||||
# if the example didn't encounter an error.
|
||||
result.error = ex unless result.error
|
||||
# If an error occurs in the after hooks, elevate it to abort testing.
|
||||
raise Exception.new("Error encountered while running after hooks", ex)
|
||||
end
|
||||
|
||||
# Runs all hooks and the example code.
|
||||
|
|
Loading…
Reference in a new issue