Sha256: eeace7c8485a5c923a6077199da147c9014df7ab18b181403f48a2326957a9ea

Contents?: true

Size: 482 Bytes

Versions: 6

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

      stat
    end
  end

  Executor.extend(Sequential)
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pork-1.3.0 lib/pork/mode/sequential.rb
pork-1.2.4 lib/pork/mode/sequential.rb
pork-1.2.3 lib/pork/mode/sequential.rb
pork-1.2.2 lib/pork/mode/sequential.rb
pork-1.2.1 lib/pork/mode/sequential.rb
pork-1.2.0 lib/pork/mode/sequential.rb