- 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
#initialize(&definition) ⇒ Setup
A new instance of Setup.
#run(situation) ⇒ Array<Symbol>
Callswith the predefined block at run-time.
Methods inherited from
38 39 40
# File 'lib/riot/runnable.rb', line 38 def initialize(&definition) super("setup", &definition) end
Instance Method Details
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 StandardError => e [:setup_error, e] end