spmason/expectations — pull request #6 by larister (2013-10-02 15:38:37+00:00)
Title: Fixed toThrow so it doesn't always pass, and added check to make sure va...

...lue is a function.

@spmason I noticed that toThrow was always passing, regardless of whether or not the function passed in threw an error. The tests did not catch this as the checks were being made in the catch block

So when

` expect(function(){
// All OK
}).toThrow();
`

didn't throw an error, the catch block never got executed and the checks never got run.