utility functions for testing attoparsec parsers with hspec