Skip to content

Commit

Permalink
lib/fancy_spec.fnc: Simple hack to support simple display of failures…
Browse files Browse the repository at this point in the history
… when exceptions get raised (instead of fancy_spec simply stopping).
  • Loading branch information
bakkdoor committed May 26, 2010
1 parent 6cb2755 commit 15b0152
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/fancy_spec.fnc
Expand Up @@ -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;
Expand Down

0 comments on commit 15b0152

Please sign in to comment.