Method: Assert::Context::SetupDSL#run_setups

Defined in:
lib/assert/context/setup_dsl.rb

#run_setups(scope) ⇒ Object



58
59
60
61
62
63
64
65
# File 'lib/assert/context/setup_dsl.rb', line 58

def run_setups(scope)
  # setup the parent...
  superclass.run_setups(scope) if superclass.respond_to?(:run_setups)
  # ... before you setup the child
  setups.compact.each do |setup|
    setup.is_a?(::Proc) ? scope.instance_eval(&setup) : scope.send(setup)
  end
end