mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Don't need reference to result anymore
This commit is contained in:
parent
d710929479
commit
4222603fea
1 changed files with 3 additions and 2 deletions
|
@ -26,7 +26,7 @@ module Spectator
|
||||||
end
|
end
|
||||||
|
|
||||||
# Runs the hooks that should be performed after the test code finishes.
|
# Runs the hooks that should be performed after the test code finishes.
|
||||||
private def run_after_hooks(result)
|
private def run_after_hooks
|
||||||
group.run_after_hooks
|
group.run_after_hooks
|
||||||
rescue ex
|
rescue ex
|
||||||
# If an error occurs in the after hooks, elevate it to abort testing.
|
# If an error occurs in the after hooks, elevate it to abort testing.
|
||||||
|
@ -39,11 +39,12 @@ module Spectator
|
||||||
ResultCapture.new.tap do |result|
|
ResultCapture.new.tap do |result|
|
||||||
# Get the proc that will call around-each hooks and the example.
|
# Get the proc that will call around-each hooks and the example.
|
||||||
wrapper = wrap_run_example(result)
|
wrapper = wrap_run_example(result)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
run_before_hooks
|
run_before_hooks
|
||||||
wrapper.call
|
wrapper.call
|
||||||
ensure
|
ensure
|
||||||
run_after_hooks(result)
|
run_after_hooks
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue