Module: Pork::Sequential

Included in:
Executor
Defined in:
lib/pork/mode/sequential.rb

Instance Method Summary collapse

Instance Method Details

#sequential(stat = Stat.new, super_env = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/pork/mode/sequential.rb', line 6

def sequential stat=Stat.new, super_env=nil
  env = Env.new(super_env)
  @tests.each do |(type, arg, test)|
    case type
    when :before
      env.before << arg
    when :after
      env.after  << arg
    when :describe
      arg.sequential(stat, env)
    when :would
      run(arg, test, stat, env)
    end
  end

  stat
end