lib/petitest/autorun.rb in petitest-0.2.1 vs lib/petitest/autorun.rb in petitest-0.3.0

- old
+ new

@@ -2,9 +2,11 @@ at_exit do if $! && !($!.is_a?(::SystemExit) && $!.success?) next end - result = Petitest::TestCasesRunner.new(Petitest::TestGroup.children).run - exit_code = result ? 0 : 1 + test_classes = Petitest::Test.children + test_plan = Petitest::TestPlan.new(test_classes: test_classes) + test_plan.run + exit_code = test_plan.passed? ? 0 : 1 exit(exit_code) end