Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Test.dies

$t.dies($anonFunction, $description) -> self

Description

Runs an anonymous function and return true if it throws an exception. Otherwise it returns false.

$t = Test()

// Test passes (returns true)
$badFun = fn { Bear.fly() }
$t.dies($badFun, 'Bears don`t fly')