Merge pull request #5 from voidus/fix-tests

Fix tests to correctly check for raised errors