class Riot::Setup

Used to decorate a setup, hookup, a teardown or anything else that is about context administration.

Public Class Methods

new(&definition) click to toggle source
Calls superclass method Riot::RunnableBlock.new
# File lib/riot/runnable.rb, line 38
def initialize(&definition)
  super("setup", &definition)
end

Public Instance Methods

run(situation) click to toggle source

Calls {Riot::Situation#setup} with the predefined block at {Riot::Context} run-time. Though this is like every other kind of {Riot::RunnableBlock}, run will not return a meaningful state, which means the reporter will likely not report anything.

@param [Riot::Situation] situation the situation for the current {Riot::Context} run @return [Array<Symbol>] array containing the evaluation state

# File lib/riot/runnable.rb, line 48
def run(situation)
  situation.setup(&definition)
  [:setup]
end