Class | ContextState |
In: |
lib/mspec/runner/context.rb
|
Parent: | Object |
children | [R] | |
examples | [R] | |
parent | [R] | |
parents | [R] | |
state | [R] | |
to_s | [R] |
Adds a nested ContextState in a shared ContextState to a containing ContextState.
Normal adoption is from the parent‘s perspective. But adopt is a good verb and it‘s reasonable for the child to adopt the parent as well. In this case, manipulating state from inside the child avoids needlessly exposing the state to manipulate it externally in the dup. (See it_should_behave_like)
Creates an ExampleState instance for the block and stores it in a list of examples to evaluate unless the example is filtered.
Injects the before/after blocks and examples from the shared describe block into this ContextState instance.
Returns a list of all after(what) blocks from self and any parents. The list is in reverse order. In other words, the blocks defined in inner describes are in the list before those defined in outer describes, and in a particular describe block those defined later are in the list before those defined earlier.
Evaluates the examples in a ContextState. Invokes the MSpec events for :enter, :before, :after, :leave.
Evaluates each block in blocks using the +MSpec.protect+ method so that exceptions are handled and tallied. Returns true and does NOT evaluate any blocks if check is true and MSpec.mode?(:pretend) is true.
Returns true if this is a shared ContextState. Essentially, when created with: describe "Something", :shared => true { … }