lib/pork/test.rb in pork-1.1.3 vs lib/pork/test.rb in pork-1.2.0
- old
+ new
@@ -1,17 +1,18 @@
require 'pork/auto'
-require 'muack'
-copy do
- before do
- Muack::API.stub(Pork::Executor).all_tests.peek_return do |tests|
- tests.reject do |name, _|
- name =~ /^Pork::(Isolate|Shuffle|Parallel): /
- end
- end
- end
+Pork.autorun(false)
- after do
- Muack.reset
+at_exit do
+ Pork.module_eval do
+ execute_mode(ENV['PORK_MODE'])
+ trap
+ run
+ %w[sequential shuffled parallel].each do |mode|
+ execute_mode(mode)
+ run
+ end
+ stat.report
+ exit stat.failures + stat.errors + ($! && 1).to_i
end
end