From 15b015208421cd94195d8983bbe662a39aa00da9 Mon Sep 17 00:00:00 2001 From: Christopher Bertels Date: Wed, 26 May 2010 16:22:04 +0200 Subject: [PATCH] lib/fancy_spec.fnc: Simple hack to support simple display of failures when exceptions get raised (instead of fancy_spec simply stopping). --- lib/fancy_spec.fnc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/fancy_spec.fnc b/lib/fancy_spec.fnc index e5d43ec6..6f6dc146 100644 --- a/lib/fancy_spec.fnc +++ b/lib/fancy_spec.fnc @@ -41,7 +41,12 @@ def class SpecTest { def run: test_obj { @@failed = []; - @block call; + try { + @block call + } catch IOError => e { + SpecTest failed_test: [e, "UNKNOWN"] + }; + (@@failed size > 0) if_true: { Console newline; "> FAILED: " ++ test_obj ++ " should " ++ @info_str print;