@@ -60,9 +60,10 @@ module Hooks
6060 # before(:example) # Declared in a parent group.
6161 # before(:example) # Declared in the current group.
6262 #
63- # If more than one `before` is declared within any one scope, they are run
64- # in the order in which they are declared. Any `around` hooks will execute
65- # later than any `before` hook regardless of scope.
63+ # If more than one `before` is declared within any one example group, they
64+ # are run in the order in which they are declared. Any `around` hooks will
65+ # execute after `before` context hooks but before any `before` example
66+ # hook regardless of where they are declared.
6667 #
6768 # ### Conditions
6869 #
@@ -263,9 +264,10 @@ def prepend_before(*args, &block)
263264 # after(:suite) # Declared in RSpec.configure.
264265 #
265266 # This is the reverse of the order in which `before` hooks are run.
266- # Similarly, if more than one `after` is declared within any one scope,
267- # they are run in reverse order of that in which they are declared. Also
268- # `around` hooks will all have run before any after hooks are invoked.
267+ # Similarly, if more than one `after` is declared within any example
268+ # group, they are run in reverse order of that in which they are declared.
269+ # Also `around` hooks will run after any `after` example hooks are
270+ # invoked but before any `after` context hooks.
269271 #
270272 # @note The `:example` and `:context` scopes are also available as
271273 # `:each` and `:all`, respectively. Use whichever you prefer.
@@ -337,8 +339,11 @@ def append_after(*args, &block)
337339 #
338340 # ### Order
339341 #
340- # All `around` hooks execute immediately surrounding an example, this means
341- # that all `before` hooks will have run and no `after` hooks will have run yet.
342+ # The `around` hooks execute surrounding an example and its hooks.
343+ #
344+ # This means after any `before` context hooks, but before any `before`
345+ # example hooks, and similarly after any `after` example hooks but before
346+ # any `after` context hooks.
342347 #
343348 # They are not a synonym for `before`/`after`.
344349 def around ( *args , &block )
0 commit comments