mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Run deferred expectations after all hooks
This commit is contained in:
parent
1e3d89884b
commit
721425c3c8
2 changed files with 2 additions and 2 deletions
|
@ -104,8 +104,7 @@ Spectator.describe "`before` and `after` hooks" do
|
|||
@@order << :after_all
|
||||
end
|
||||
|
||||
xit "gets run in order" do
|
||||
# TODO: The after_all hook isn't evaluated yet because the group hasn't "finished."
|
||||
it "gets run in order" do
|
||||
expect(@@order).to_eventually eq(%i[before_all before_each after_each after_all])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,6 +19,7 @@ module Spectator
|
|||
ResultCapture.new.tap do |result|
|
||||
context.run_before_hooks(self)
|
||||
run_example(result)
|
||||
@finished = true
|
||||
context.run_after_hooks(self)
|
||||
run_deferred(result) unless result.error
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue