Sha256: 08e37bcb7fa8345f2fca7167ac4a935a36f182ec63d449459469a9464064f206

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

require 'pork'

module Pork
  module Sequential
    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(stat, arg, test, env)
        end
      end

      stat
    end
  end

  Executor.extend(Sequential)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pork-1.3.1 lib/pork/mode/sequential.rb