Refactored parse test code

EarleyParser spec file less verbose thanks to added helper method.