Add "after" hooks in reverse order to match RSpec

This commit is contained in:
Michael Miller 2021-07-31 15:48:54 -06:00
parent edcb5118e6
commit 3dc3b88dbe
No known key found for this signature in database
GPG key ID: F9A0C5C65B162436

View file

@ -102,8 +102,8 @@ module Spectator
private def apply_hooks(group)
@before_all_hooks.each { |hook| group.add_before_all_hook(hook) }
@before_each_hooks.each { |hook| group.add_before_each_hook(hook) }
@after_all_hooks.each { |hook| group.add_after_all_hook(hook) }
@after_each_hooks.each { |hook| group.add_after_each_hook(hook) }
@after_all_hooks.each { |hook| group.prepend_after_all_hook(hook) }
@after_each_hooks.each { |hook| group.prepend_after_each_hook(hook) }
@around_each_hooks.each { |hook| group.add_around_each_hook(hook) }
end
end