- Defined in:
Used to decorate a setup, hookup, a teardown or anything else that is about context administration.
Instance Attribute Summary
Attributes inherited from
Instance Method Summary (collapse)
- (Setup) initialize(&definition)
A new instance of Setup.
- (Array<Symbol>) run(situation)
Callswith the predefined block at run-time.
Methods inherited from
- () initialize(&definition)
A new instance of Setup
38 39 40
# File 'lib/riot/runnable.rb', line 38 def initialize(&definition) super("setup", &definition) end
Instance Method Details
- (<Symbol>) run(situation)
Callswith the predefined block at run-time. Though this is like every other kind of , run will not return a meaningful state, which means the reporter will likely not report anything.
48 49 50 51 52 53
# File 'lib/riot/runnable.rb', line 48 def run(situation) situation.setup(&definition) [:setup] rescue Exception => e [:setup_error, e] end