append_before(scope = :each, &block)public
Registers a block to be executed before examples. scope can be :each (default), :all, or :suite. When :each, the block is executed before each example. When :all, the block is executed only once before any examples are run.
# File lib/spec/example/before_and_after_hooks.rb, line 19 def append_before(scope = :each, &block) before_parts(scope) << block end