From 2bd9275a542753f88de75cad20bce4881ca65505 Mon Sep 17 00:00:00 2001 From: Ryan Melton Date: Thu, 21 Nov 2019 20:11:38 -0700 Subject: [PATCH] Update test.rb Also fix earlier setup and teardown to support abort_on_exception --- lib/cosmos/tools/test_runner/test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cosmos/tools/test_runner/test.rb b/lib/cosmos/tools/test_runner/test.rb index e634774a6..3ea8bdc34 100644 --- a/lib/cosmos/tools/test_runner/test.rb +++ b/lib/cosmos/tools/test_runner/test.rb @@ -126,7 +126,7 @@ def run if result results << result yield result if block_given? - raise StopScript if result.stopped + raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped end # Run each test case @@ -141,7 +141,7 @@ def run if result results << result yield result if block_given? - raise StopScript if result.stopped + raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped end results