Method: MotionSpec.execute_context

Defined in:
lib/motion-spec/core.rb

.execute_context(context) ⇒ Object



60
61
62
63
64
65
66
67
68
69
70
# File 'lib/motion-spec/core.rb', line 60

def self.execute_context(context)
  unless respond_to?(:handle_specification_begin)
    extend(Outputs[ENV['output']] || DEFAULT_OUTPUT_MODULE)
  end

  Counter[:context_depth] += 1
  handle_specification_begin(context.name)
  context.run
  handle_specification_end
  Counter[:context_depth] -= 1
end