method

append_before

rspec latest stable - Class: Spec::Example::BeforeAndAfterHooks
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.