Refactored tests that catch parse errors to share the same code
Merge pull request #210 from iainbeeston/assert_raise_parser_error

Refactored parser error code