lib/pork/mode/sequential.rb in pork-1.4.4 vs lib/pork/mode/sequential.rb in pork-1.5.0
- old
+ new
@@ -1,35 +1,10 @@
-require 'pork'
-
module Pork
module Sequential
- def sequential stat=Stat.new, paths=nil
- if paths
- require 'pork/isolate'
- paths.inject(stat, &method(:isolate))
- else # maybe we could remove this mode if it's not faster and lighter
- sequential_with_env(stat)
- end
- end
-
- protected
- def sequential_with_env stat, 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_with_env(stat, env)
- when :would
- run(stat, arg, test, env)
- end
- end
-
- stat
+ def sequential stat=Stat.new, paths=all_paths
+ stat.prepare(paths)
+ paths.inject(stat, &method(:isolate))
end
end
Executor.extend(Sequential)
end