Method: Spec::Runner::Configuration#append_before
- Defined in:
- lib/spec/runner/configuration.rb
#append_before(scope = :each, options = {}, &proc) ⇒ Object Also known as: before
Appends a global before block to all example groups. scope can be any of :each (default), :all, or :suite. When :each, the block is executed before each example. When :all, the block is executed once per example group, before any of its examples are run. When :suite the block is run once before the entire suite is run.
100 101 102 |
# File 'lib/spec/runner/configuration.rb', line 100 def append_before(scope = :each, ={}, &proc) add_callback(:append_before, scope, , &proc) end |