- Defined in:
Special middleware used by Context directly. It will always be the last in the chain and is the actual place where the user's runtime context is processed.
Instance Attribute Summary
Attributes inherited from
Instance Method Summary (collapse)
- (Object) call(context)
The magic happens here.
- (AllImportantMiddleware) initialize(&context_definition)
A new instance of AllImportantMiddleware.
Methods inherited from
- () initialize(&context_definition)
97 98 99
# File 'lib/riot/middleware.rb', line 97 def initialize(&context_definition) @context_definition = context_definition end
Instance Method Details
- () call(context)
The magic happens here. Because you have access to the Context, you can add your own setups, hookups, etc. call will be called before any tests are run, but after the Context is configured. Though something will likely be returned, do not put any faith in what that will be.
# File 'lib/riot/middleware.rb', line 102 def call(context) context.instance_eval(&@context_definition); end