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)
|
private def run_after_hooks(result)
|
||||||
group.run_after_hooks
|
group.run_after_hooks
|
||||||
rescue ex
|
rescue ex
|
||||||
# Store the error from the hooks
|
# If an error occurs in the after hooks, elevate it to abort testing.
|
||||||
# if the example didn't encounter an error.
|
raise Exception.new("Error encountered while running after hooks", ex)
|
||||||
result.error = ex unless result.error
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Runs all hooks and the example code.
|
# Runs all hooks and the example code.
|
||||||
|
|
Loading…
Reference in a new issue