Module Spec::Example::BeforeAndAfterHooks
In: lib/spec/example/before_and_after_hooks.rb

Methods

Public Instance methods

after(scope = :each, &block)

Alias for prepend_after

Registers a block to be executed after each example. This method appends block to existing after blocks.

See append_before for scoping semantics.

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.

before(scope = :each, &block)

Alias for append_before

Registers a block to be executed after each example. This method prepends block to existing after blocks.

See append_before for scoping semantics.

Registers a block to be executed before each example. This method prepends block to existing before blocks.

See append_before for scoping semantics.

[Validate]