I like RSPEC, I LOVE RSPEC. But, this morning, I found a flaw in its beauty.
If you are using a lambda to verify that a block of code raises an exception it works fine.
A problem occurs if you are using a lambda like….
… do some stuff …
to check that an error of that type is not raised.
The problem is, that the ‘raise_error’ will trap errors looking for the specific type of error you are asking for, but, in doing so, it only takes notice of the specific type of error you mention, and traps but ignores all others. So, if an expectation within the block fails, this will not be reported.