Add short before/after hook name
This commit is contained in:
parent
24fd7d1e91
commit
4906dfae0d
|
@ -124,11 +124,21 @@ module Spectator::DSL
|
|||
# This means that values defined by `let` and `subject` are available.
|
||||
define_example_hook :before_each
|
||||
|
||||
# :ditto:
|
||||
macro before(&block)
|
||||
before_each {{block}}
|
||||
end
|
||||
|
||||
# Defines a block of code that will be invoked after every example in the group.
|
||||
# The block will be run in the context of the current running example.
|
||||
# This means that values defined by `let` and `subject` are available.
|
||||
define_example_hook :after_each
|
||||
|
||||
# :ditto:
|
||||
macro after(&block)
|
||||
after_each {{block}}
|
||||
end
|
||||
|
||||
# Defines a block of code that will be invoked around every example in the group.
|
||||
# The block will be run in the context of the current running example.
|
||||
# This means that values defined by `let` and `subject` are available.
|
||||
|
@ -139,6 +149,11 @@ module Spectator::DSL
|
|||
# More code can run afterwards (in the block).
|
||||
define_example_hook :around_each
|
||||
|
||||
# :ditto:
|
||||
macro around(&block)
|
||||
around_each {{block}}
|
||||
end
|
||||
|
||||
# Defines a block of code that will be invoked before every example in the group.
|
||||
# The block will be run in the context of the current running example.
|
||||
# This means that values defined by `let` and `subject` are available.
|
||||
|
|
Loading…
Reference in New Issue